diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/system.lua | 6 | ||||
-rw-r--r-- | modules/admin-mini/luasrc/controller/mini/system.lua | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index c89c5859b9..ba592da2b9 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 8b711d511c..3a5f12c527 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 |