Replace Dos line endings with Unix ones where needed
[project/luci.git] / modules / admin-full / luasrc / model / cbi / admin_system / sshkeys.lua
index 1c5569c..26410c9 100644 (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
\ No newline at end of file
+return f