X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fadmin-mini%2Fluasrc%2Fcontroller%2Fmini%2Fsystem.lua;h=3a5f12c527dabf3a3522c23619addec8f1fb56eb;hb=f5d4157cab9181b331cfca0f22e529242ba39c66;hp=265443bd32025a320ab63c4f83c9e760b025d900;hpb=7514604860540ad30bbe82aabc6692f89f301b92;p=project%2Fluci.git diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua index 265443bd3..3a5f12c52 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -110,6 +110,7 @@ function action_upgrade() end end + luci.http.prepare_content("text/html") luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) end @@ -118,8 +119,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