applications/splash: Fix error when replacing markers, delete file which contains...
[project/luci.git] / applications / luci-splash / luasrc / model / cbi / splash / splashtext.lua
index 82ba0b9dbf8a611941302d5aaa602bfdb99ce4d7..5b744e1ccc4c67a108bac6520dd3d970ca5cc596 100644 (file)
@@ -33,6 +33,8 @@ function f.handle(self, state, data)
        if state == FORM_VALID then
                if data.text then
                        fs.writefile(splashtextfile, data.text:gsub("\r\n", "\n"))
+               else
+                       fs.unlink(splashtextfile)
                end
        end
        return true