diff options
-rw-r--r-- | libs/web/root/etc/config/luci | 9 | ||||
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/system.lua | 6 | ||||
-rw-r--r-- | modules/admin-mini/luasrc/controller/mini/system.lua | 8 |
3 files changed, 13 insertions, 10 deletions
diff --git a/libs/web/root/etc/config/luci b/libs/web/root/etc/config/luci index 4e31f9d9b..54363e009 100644 --- a/libs/web/root/etc/config/luci +++ b/libs/web/root/etc/config/luci @@ -10,12 +10,11 @@ config core brand option distro "Development Snapshot" config extern flash_keep - option uci "/etc/config" - option dropbear "/etc/dropbear" - option openvpn "/etc/openvpn" + option uci "/etc/config/" + option dropbear "/etc/dropbear/" + option openvpn "/etc/openvpn/" option passwd "/etc/passwd" - option ipkg "/etc/ipkg.conf" - option httpd "/etc/httpd.conf" + option opkg "/etc/opkg.conf" option firewall "/etc/firewall.user" config internal languages diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index c89c5859b..ba592da2b 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -222,8 +222,10 @@ function _keep_pattern() local files = luci.model.uci.cursor():get_all("luci", "flash_keep") if files then kpattern = "" - for k,v in pairs(files) do - kpattern = kpattern .. " " .. v + for k, v in pairs(files) do + if k:sub(1,1) ~= "." and luci.fs.glob(v) then + kpattern = kpattern .. " " .. v + end end end return kpattern diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua index 8b711d511..3a5f12c52 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -119,9 +119,11 @@ function _keep_pattern() local files = luci.model.uci.cursor():get_all("luci", "flash_keep") if files then kpattern = "" - for k,v in pairs(files) do - kpattern = kpattern .. " " .. v + for k, v in pairs(files) do + if k:sub(1,1) ~= "." and luci.fs.glob(v) then + kpattern = kpattern .. " " .. v + end end end return kpattern -end +end
\ No newline at end of file |