summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asterisk-listfiles-html.lsp4
-rw-r--r--asterisk-model.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/asterisk-listfiles-html.lsp b/asterisk-listfiles-html.lsp
index d4d1080..087ad56 100644
--- a/asterisk-listfiles-html.lsp
+++ b/asterisk-listfiles-html.lsp
@@ -44,8 +44,8 @@ end %>
<tr>
<td><% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="edit"}), page_info, -1) %></td>
<td><%= html.html_escape(file.filename) %></td>
- <td><span class="hide"><%= html.html_escape(file.orig_size) %>b</span><%= html.html_escape(file.size) %></td>
- <td><%= html.html_escape(file.mtime) %></td>
+ <td><span class="hide"><%= html.html_escape(file.size or 0) %>b</span><%= format.formatfilesize(file.size) %></td>
+ <td><%= format.formattime(file.mtime) %></td>
</tr>
<% end %>
</tbody></table>
diff --git a/asterisk-model.lua b/asterisk-model.lua
index 6858e6f..6f37fe7 100644
--- a/asterisk-model.lua
+++ b/asterisk-model.lua
@@ -52,7 +52,7 @@ end
mymodule.list_files = function()
local retval = {}
for file in fs.find(null, baseurl) do
- local details = fs.stat(file)
+ local details = posix.stat(file)
if details.type == "regular" then
details.filename = file
table.insert(retval, details)