admin-full/admin-mini: Fixed backup module
[project/luci.git] / modules / admin-mini / luasrc / controller / mini / system.lua
index 149cd58..3a5f12c 100644 (file)
@@ -110,8 +110,8 @@ function action_upgrade()
                end
        end
 
+       luci.http.prepare_content("text/html")
        luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail})
-       luci.sys.reboot()
 end
 
 function _keep_pattern()
@@ -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