diff options
-rw-r--r-- | applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua | 10 |
1 files changed, 1 insertions, 9 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 7197f45ef6..25d69e0cc2 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-file.lua @@ -18,15 +18,7 @@ local function makeForm(id, title, desc) return f end -if not cfg_file or not fs.access(cfg_file) then - local f = makeForm("error", nil, translatef("The OVPN config file (%s) could not be found, please check your configuration.", cfg_file or "n/a")) - f:append(Template("openvpn/ovpn_css")) - f.reset = false - f.submit = false - return f -end - -if fs.stat(cfg_file).size >= 102400 then +if fs.access(cfg_file) and fs.stat(cfg_file).size >= 102400 then local f = makeForm("error", nil, translatef("The size of the OVPN config file (%s) is too large for online editing in LuCI (≥ 100 KB). ", cfg_file) .. translate("Please edit this file directly in a terminal session.")) |