From e190a99be15becdde36dc18fce9ac9d760a024db Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 19 Sep 2008 17:51:25 +0000 Subject: [PATCH] admin-full/admin-mini: Fixed backup module --- libs/web/root/etc/config/luci | 9 ++++----- modules/admin-full/luasrc/controller/admin/system.lua | 6 ++++-- 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 40228b07fb..f9b51c8030 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 5d64336e03..981d6255f2 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -221,8 +221,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 6d16ef8650..a07918518f 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -118,9 +118,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 -- 2.30.2