From 4f126632a542f9e8948cd58a03c3ccbdee1c0d9e Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Sun, 2 Sep 2012 19:34:32 +0000 Subject: applications/splash: Fix error when replacing markers, delete file which contains the custom text if it is empty, #477 --- applications/luci-splash/luasrc/model/cbi/splash/splashtext.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'applications/luci-splash/luasrc/model/cbi') 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 -- cgit v1.2.3