luci: app_update use default_path when not set in config

This commit is contained in:
nftbty 2023-03-24 13:39:31 +08:00 committed by sbwml
parent 3795defad7
commit 623099d837

View File

@ -413,7 +413,9 @@ local function get_bin_version_cache(file, cmd)
end
function get_app_path(app_name)
local def_path = com[app_name].default_path
local path = uci_get_type("global_app", app_name:gsub("%-","_") .. "_file")
path = path and (#path>0 and path or def_path) or def_path
return path
end