summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-vnstat/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-vnstat/luasrc')
-rw-r--r--applications/luci-vnstat/luasrc/model/cbi/vnstat.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/applications/luci-vnstat/luasrc/model/cbi/vnstat.lua b/applications/luci-vnstat/luasrc/model/cbi/vnstat.lua
index 9161ec6a6..5c5e8f7aa 100644
--- a/applications/luci-vnstat/luasrc/model/cbi/vnstat.lua
+++ b/applications/luci-vnstat/luasrc/model/cbi/vnstat.lua
@@ -37,10 +37,12 @@ local ifaces = { }
local enabled = { }
local iface
-for iface in fs.dir(dbdir) do
- if iface:sub(1,1) ~= '.' then
- ifaces[iface] = iface
- enabled[iface] = iface
+if fs.access(dbdir) then
+ for iface in fs.dir(dbdir) do
+ if iface:sub(1,1) ~= '.' then
+ ifaces[iface] = iface
+ enabled[iface] = iface
+ end
end
end