From 64b80b8f118753930357a236ce96ed5e4d720cda Mon Sep 17 00:00:00 2001 From: Anna Tikhomirova Date: Sun, 20 Mar 2022 02:24:42 +0300 Subject: luci-app-openvpn: fix openvpn config corruption on upload Signed-off-by: Anna Tikhomirova --- applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications/luci-app-openvpn/luasrc/model') 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) -- cgit v1.2.3