summaryrefslogtreecommitdiffhomepage
path: root/libs/uvl/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-07-19 00:24:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-07-19 00:24:58 +0000
commit8fcd841aa9af96c8a4a4d3c1a555d2d1ed42332c (patch)
treecf6466b373236442e63742cb4f73b22579940784 /libs/uvl/luasrc
parent6abba6163290b58cd9ebae98d8459ac38ef52a4b (diff)
convert luci.fs users to nixio.fs api
Diffstat (limited to 'libs/uvl/luasrc')
-rw-r--r--libs/uvl/luasrc/uvl.lua10
-rw-r--r--libs/uvl/luasrc/uvl/datatypes.lua2
-rw-r--r--libs/uvl/luasrc/uvl/validation.lua2
3 files changed, 8 insertions, 6 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
diff --git a/libs/uvl/luasrc/uvl/datatypes.lua b/libs/uvl/luasrc/uvl/datatypes.lua
index 1ad0891f2..c6a5de398 100644
--- a/libs/uvl/luasrc/uvl/datatypes.lua
+++ b/libs/uvl/luasrc/uvl/datatypes.lua
@@ -14,7 +14,7 @@ $Id$
]]--
-local fs = require "luci.fs"
+local fs = require "nixio.fs"
local ip = require "luci.ip"
local math = require "math"
local util = require "luci.util"
diff --git a/libs/uvl/luasrc/uvl/validation.lua b/libs/uvl/luasrc/uvl/validation.lua
index 90fde64f1..47eed6b1c 100644
--- a/libs/uvl/luasrc/uvl/validation.lua
+++ b/libs/uvl/luasrc/uvl/validation.lua
@@ -15,7 +15,7 @@ $Id$
]]--
local os = require "os"
-local fs = require "luci.fs"
+local fs = require "nixio.fs"
local sys = require "luci.sys"
local ERR = require "luci.uvl.errors"