summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua
diff options
context:
space:
mode:
authorAnna Tikhomirova <vamp@vampik.ru>2022-03-20 02:24:42 +0300
committerAnna Tikhomirova <vamp@vampik.ru>2022-03-20 02:24:42 +0300
commit64b80b8f118753930357a236ce96ed5e4d720cda (patch)
treeb662c336ad98177d05810e7fd4e61a79e902cf29 /applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua
parentf27fe280aa7a1d39de7144298541bfac8bb59f7f (diff)
luci-app-openvpn: fix openvpn config corruption on upload
Signed-off-by: Anna Tikhomirova <vamp@vampik.ru>
Diffstat (limited to 'applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua')
-rw-r--r--applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua
index fa823964ac..7197f45ef6 100644
--- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua
+++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua
@@ -51,7 +51,7 @@ function file.cfgvalue()
end
function file.write(self, section, data1)
- return fs.writefile(cfg_file, "\n" .. util.trim(data1:gsub("\r\n", "\n")) .. "\n")
+ return fs.writefile(cfg_file, util.trim(data1:gsub("\r\n", "\n")) .. "\n")
end
function file.remove(self, section, value)