summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-statistics')
-rw-r--r--applications/luci-statistics/luasrc/statistics/datatree.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/applications/luci-statistics/luasrc/statistics/datatree.lua b/applications/luci-statistics/luasrc/statistics/datatree.lua
index ba6d7740b..327b8ef36 100644
--- a/applications/luci-statistics/luasrc/statistics/datatree.lua
+++ b/applications/luci-statistics/luasrc/statistics/datatree.lua
@@ -44,7 +44,11 @@ function Instance._notzero( self, table )
end
function Instance._scan( self )
- for i, plugin in ipairs( fs.dir( self._libdir ) ) do
+ local dir = fs.dir( self._libdir )
+ if not dir then
+ return
+ end
+ for i, plugin in ipairs( dir ) do
if plugin:match("%w+.so") then
self._plugins[ plugin:gsub(".so", "") ] = { }
end