summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--postfix-listfiles-html.lsp4
-rw-r--r--postfix-model.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/postfix-listfiles-html.lsp b/postfix-listfiles-html.lsp
index d21b875..8549820 100644
--- a/postfix-listfiles-html.lsp
+++ b/postfix-listfiles-html.lsp
@@ -49,8 +49,8 @@ end %>
<% end %>
</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/postfix-model.lua b/postfix-model.lua
index 8708263..280e415 100644
--- a/postfix-model.lua
+++ b/postfix-model.lua
@@ -66,7 +66,7 @@ function mymodule.getfilelist()
local listed_files = {}
for i,name in ipairs(geteditablefilelist()) do
- local filedetails = fs.stat(name)
+ local filedetails = posix.stat(name)
if filedetails then
filedetails.filename = name
table.insert ( listed_files, filedetails )
@@ -75,7 +75,7 @@ function mymodule.getfilelist()
table.sort(listed_files, function (a,b) return (a.filename < b.filename) end )
- return cfe({ type="list", value=listed_files, label="Postfix File List" })
+ return cfe({ type="structure", value=listed_files, label="Postfix File List" })
end
function mymodule.getfiledetails(filename)