summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/luasrc/model
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2012-09-02 19:34:32 +0000
committerManuel Munz <freifunk@somakoma.de>2012-09-02 19:34:32 +0000
commit4f126632a542f9e8948cd58a03c3ccbdee1c0d9e (patch)
treefaaaaa40dedc83c63f506927e9839a20375ee670 /applications/luci-splash/luasrc/model
parent81b554b7a0fd2cd8d991b119ff8511af9da75c4a (diff)
applications/splash: Fix error when replacing markers, delete file which contains the custom text if it is empty, #477
Diffstat (limited to 'applications/luci-splash/luasrc/model')
-rw-r--r--applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua b/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua
index 82ba0b9dbf..5b744e1ccc 100644
--- a/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua
+++ b/applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua
@@ -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