From 2d2c9b994ca22a82cb7578e005ac7ab1ee9f88d2 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 30 Dec 2015 13:57:01 +0000 Subject: Change listfiles filesize to size, size and mtime not user-friendly, use posix.stat over fs.stat, use new format functions --- dansguardian-listfiles-html.lsp | 18 ++---------------- dansguardian-model.lua | 14 ++++++++------ 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/dansguardian-listfiles-html.lsp b/dansguardian-listfiles-html.lsp index df2685e..08ec66e 100644 --- a/dansguardian-listfiles-html.lsp +++ b/dansguardian-listfiles-html.lsp @@ -3,20 +3,6 @@ htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> -<% -function convertsize(size) - if string.find(size, "k$") then - return tonumber(string.match(size, "[%d.]*")) * 1024.0 - elseif string.find(size, "M$") then - return tonumber(string.match(size, "[%d.]*")) * 1024.0 * 1024.0 - elseif string.find(size, "G$") then - return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0 - else - return tonumber(string.match(size, "[%d.]*")) - end -end -%> -