Replace Dos line endings with Unix ones where needed
This commit is contained in:
parent
514a9bfec7
commit
527edf0ba0
3 changed files with 5 additions and 5 deletions
|
@ -26,10 +26,10 @@ end
|
|||
function f.handle(self, state, data)
|
||||
if state == FORM_VALID then
|
||||
if data.crons then
|
||||
luci.fs.writefile(cronfile, data.crons)
|
||||
luci.fs.writefile(cronfile, data.crons:gsub("\r\n", "\n"))
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
return f
|
||||
return f
|
||||
|
|
|
@ -23,7 +23,7 @@ function t.cfgvalue()
|
|||
end
|
||||
|
||||
function t.write(self, section, data)
|
||||
return luci.fs.writefile(ipkgfile, data)
|
||||
return luci.fs.writefile(ipkgfile, data:gsub("\r\n", "\n"))
|
||||
end
|
||||
|
||||
f:append(Template("admin_system/ipkg"))
|
||||
|
|
|
@ -26,10 +26,10 @@ end
|
|||
function f.handle(self, state, data)
|
||||
if state == FORM_VALID then
|
||||
if data.keys then
|
||||
luci.fs.writefile(keyfile, data.keys)
|
||||
luci.fs.writefile(keyfile, data.keys:gsub("\r\n", "\n"))
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
return f
|
||||
return f
|
||||
|
|
Loading…
Reference in a new issue