git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
77f8074
)
some error handling for fs.dir(...) == nil
author
Felix Fietkau
<redacted>
Tue, 3 Jun 2008 22:50:21 +0000
(22:50 +0000)
committer
Felix Fietkau
<redacted>
Tue, 3 Jun 2008 22:50:21 +0000
(22:50 +0000)
applications/luci-statistics/luasrc/statistics/datatree.lua
patch
|
blob
|
history
diff --git
a/applications/luci-statistics/luasrc/statistics/datatree.lua
b/applications/luci-statistics/luasrc/statistics/datatree.lua
index ba6d7740b1b055ed6d599f2563120c5ef3fa9eae..327b8ef36ad1e51cb6b291890a6a4f0baedc69f7 100644
(file)
--- 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
git clone https://git.99rst.org/PROJECT