summaryrefslogtreecommitdiffstats
path: root/weblog-listfiles-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-02-05 19:56:42 +0000
committerTed Trask <ttrask01@yahoo.com>2014-02-05 19:56:42 +0000
commitd77bf9609380d27301abeba31e467039517cb8d5 (patch)
treefedaa02dc2efd0d62cb696ed1163b7f8f7a59f01 /weblog-listfiles-html.lsp
parent7dad3b2d66bfdc5d653961e8b4f87870106aaeee (diff)
downloadacf-weblog-d77bf9609380d27301abeba31e467039517cb8d5.tar.bz2
acf-weblog-d77bf9609380d27301abeba31e467039517cb8d5.tar.xz
Fix issues with tablesorter sorting
Diffstat (limited to 'weblog-listfiles-html.lsp')
-rw-r--r--weblog-listfiles-html.lsp10
1 files changed, 5 insertions, 5 deletions
diff --git a/weblog-listfiles-html.lsp b/weblog-listfiles-html.lsp
index 673afa8..ea2ab2c 100644
--- a/weblog-listfiles-html.lsp
+++ b/weblog-listfiles-html.lsp
@@ -6,13 +6,13 @@ html = require("acf.html")
<%
function convertsize(size)
if string.find(size, "k$") then
- return tonumber(string.match(size, "%d*")) * 1024
- elseif string.find(string.match(size, "%d*"), "M$") then
- return tonumber(size) * 1024 * 1024
+ 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 * 1024 * 1024
+ return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0
else
- return tonumber(size)
+ return tonumber(string.match(size, "[%d.]*"))
end
end
%>