From ffa7d88fbc30ef500e108325f48826159d4309f8 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 30 Dec 2015 14:16:27 +0000 Subject: Change listfiles filesize to size, size and mtime not user-friendly, use posix.stat over fs.stat, use new format functions --- weblog-model.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'weblog-model.lua') diff --git a/weblog-model.lua b/weblog-model.lua index 3f1247e..682b093 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -742,7 +742,7 @@ end -- PUBLIC FUNCTIONS function mymodule.getsourcelist() - local retval = cfe({ type="list", value={}, label="Weblog Source List" }) + local retval = cfe({ type="structure", value={}, label="Weblog Source List" }) local res, err = pcall(function() databaseconnect(DatabaseUser) retval.value = listsourceentries() @@ -1482,9 +1482,9 @@ function mymodule.create_database(self, database) end function mymodule.listfiles() - local retval = cfe({ type="list", value={}, label="Weblog Files" }) + local retval = cfe({ type="structure", value={}, label="Weblog Files" }) for i,file in ipairs(files) do - local details = fs.stat(file) or {} + local details = posix.stat(file) or {} details.filename = file retval.value[#retval.value + 1] = details end -- cgit v1.2.3