Fix feature library upload

* openwrt-21/22
This commit is contained in:
sbwml 2022-08-13 00:12:17 +08:00
parent 01c29a88b0
commit 8af9e08f73

View File

@ -58,13 +58,7 @@ http.setfilehandler(function(meta, chunk, eof)
local line = fd2:read("*l");
fd2:close()
local ret = string.match(line, "#version")
local lang = m.uci:get_all("luci.main.lang")
local feature_file = ""
if "" == lang or "auto" == lang then
feature_file = "/etc/appfilter/feature.cfg"
else
feature_file = "/etc/appfilter/feature_" .. lang .. ".cfg"
end
local feature_file = "/etc/appfilter/feature.cfg"
if ret ~= nil then
local cmd = "cp /tmp/upload/" .. meta.file .. " " .. feature_file;
os.execute(cmd);