Replace Dos line endings with Unix ones where needed

This commit is contained in:
Steven Barth 2009-01-20 10:56:07 +00:00
parent 514a9bfec7
commit 527edf0ba0
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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"))

View file

@ -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