diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-07-19 00:24:58 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-07-19 00:24:58 +0000 |
commit | 8fcd841aa9af96c8a4a4d3c1a555d2d1ed42332c (patch) | |
tree | cf6466b373236442e63742cb4f73b22579940784 /libs/uvl/luasrc/uvl.lua | |
parent | 6abba6163290b58cd9ebae98d8459ac38ef52a4b (diff) |
convert luci.fs users to nixio.fs api
Diffstat (limited to 'libs/uvl/luasrc/uvl.lua')
-rw-r--r-- | libs/uvl/luasrc/uvl.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/uvl/luasrc/uvl.lua b/libs/uvl/luasrc/uvl.lua index dd8058f03..33f45bf89 100644 --- a/libs/uvl/luasrc/uvl.lua +++ b/libs/uvl/luasrc/uvl.lua @@ -19,7 +19,9 @@ $Id$ -- @class module -- @cstyle instance -local fs = require "luci.fs" +require "nixio.util" + +local fs = require "nixio.fs" local uci = require "luci.model.uci" local util = require "luci.util" local table = require "table" @@ -403,11 +405,11 @@ function UVL.read_scheme( self, shm, alias ) local bc = "%s/bytecode/%s.lua" %{ self.schemedir, shm } if not fs.access(bc) then - local files = fs.glob(self.schemedir .. '/*/' .. shm) + local files = nixio.util.consume(fs.glob(self.schemedir .. '/*/' .. shm)) - if files then + if #files > 0 then local ok, err - for i, file in ipairs( files ) do + for file in files do if not fs.access(file) then return false, so:error(ERR.SME_READ(so,file)) end |