summaryrefslogtreecommitdiffstats
path: root/syslog-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'syslog-model.lua')
-rw-r--r--syslog-model.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/syslog-model.lua b/syslog-model.lua
index 273cc27..25969fe 100644
--- a/syslog-model.lua
+++ b/syslog-model.lua
@@ -202,8 +202,7 @@ end
function update_filedetails (filedetails)
-- Validation before writing
- filedetails.value.filecontent.value = format.dostounix(filedetails.value.filecontent.value)
- filedetails.value.filecontent.value = filedetails.value.filecontent.value:gsub("\n+$", "")
+ filedetails.value.filecontent.value = string.gsub(format.dostounix(filedetails.value.filecontent.value), "\n+$", "")
local configcontent = getopts.getoptsfromfile(filedetails.value.filecontent.value, "", "SYSLOGD_OPTS", true) or {}
local config = makeconfig(configcontent)
local success, errtxt