summaryrefslogtreecommitdiffstats
path: root/provisioning-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'provisioning-model.lua')
-rw-r--r--provisioning-model.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua
index eac1623..877a2b7 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -571,7 +571,7 @@ mymodule.list_templates = function()
fs.create_directory(baseurl)
for f in posix.files(baseurl) do
local file = baseurl..f
- local details = posix.stat(file)
+ local details = fs.stat(file)
if details.type == "regular" then
if not reversed[file] then
retval[#retval+1] = {filename=file}
@@ -621,7 +621,7 @@ mymodule.get_template = function(self, clientdata)
end
end
local filedetails = modelfunctions.getfiledetails(retval.filename.value, function(filename) return validator.is_valid_filename(filename, baseurl) end)
- for i,n in ipairs({"filecontent", "size", "mtime"}) do
+ for i,n in ipairs({"filecontent", "filesize", "mtime"}) do
retval[n] = filedetails.value[n]
end
@@ -2020,7 +2020,7 @@ end
function mymodule.list_files()
local retval = {}
for i,file in ipairs(scriptfiles) do
- local details = posix.stat(file) or {}
+ local details = fs.stat(file) or {}
details.filename = file
table.insert(retval, details)
end