summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-02 09:02:20 +0000
committerSteven Barth <steven@midlink.org>2008-09-02 09:02:20 +0000
commitbdf75b1e030c2ae96d9b89219bb09a5c78176a5a (patch)
tree7b2287933f3c850dde71936dcb2ed951f5bf20e6 /libs
parent765d5b8540edcbbb62bb9242b57930d249b2af09 (diff)
libs/uci: Optimized workaround
Diffstat (limited to 'libs')
-rw-r--r--libs/uci/luasrc/model/uci.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/uci/luasrc/model/uci.lua b/libs/uci/luasrc/model/uci.lua
index e26f9030a..82c76ced2 100644
--- a/libs/uci/luasrc/model/uci.lua
+++ b/libs/uci/luasrc/model/uci.lua
@@ -153,12 +153,14 @@ function Cursor.changes(self, config)
if config then
return Cursor._changes(self, config)
else
- local changes = {}
- for k,v in pairs(require "luci.fs".dir(self:get_savedir())) do
- if v ~= "." and v ~= ".." then
- util.update(changes, Cursor._changes(self, v))
+ local changes = Cursor._changes(self)
+ util.copcall(function()
+ for k,v in pairs(require "luci.fs".dir(self:get_savedir())) do
+ if v ~= "." and v ~= ".." then
+ util.update(changes, Cursor._changes(self, v))
+ end
end
- end
+ end)
return changes
end
end