summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cron-model.lua8
-rw-r--r--interfaces-model.lua9
2 files changed, 7 insertions, 10 deletions
diff --git a/cron-model.lua b/cron-model.lua
index 65d4393..40ec992 100644
--- a/cron-model.lua
+++ b/cron-model.lua
@@ -24,9 +24,11 @@ local function list_periods()
end
--[[ local reverseperiods = {}
for i,per in ipairs(periods) do reverseperiods[per] = i end
- for dir in posix.files(baseurl) do
- if fs.is_dir(baseurl .. dir) and (dir ~= ".") and (dir ~= "..") and not reverseperiods[dir] then
- periods[#periods+1] = dir
+ if fs.is_dir(baseurl) then
+ for dir in posix.files(baseurl) do
+ if fs.is_dir(baseurl .. dir) and (dir ~= ".") and (dir ~= "..") and not reverseperiods[dir] then
+ periods[#periods+1] = dir
+ end
end
end--]]
end
diff --git a/interfaces-model.lua b/interfaces-model.lua
index 5c10283..93456e4 100644
--- a/interfaces-model.lua
+++ b/interfaces-model.lua
@@ -92,13 +92,8 @@ iface.read_file = function ()
end
iface.write_file = function ()
- local rc = false
- local file = io.open ( iface.file.label, "w")
- if file then
- file:write ( iface.file.value )
- file:close()
- rc = true
- end
+ local rc = true
+ fs.write_file(iface.file.label, iface.file.value)
return rc
end