fix fallout from nixio.fs transition
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 19 Jul 2009 00:38:52 +0000 (00:38 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 19 Jul 2009 00:38:52 +0000 (00:38 +0000)
libs/uvl/luasrc/uvl.lua
libs/web/luasrc/template.lua
modules/admin-full/luasrc/view/admin_status/routes.htm

index 33f45bf..7f149cf 100644 (file)
@@ -19,11 +19,10 @@ $Id$
 -- @class      module
 -- @cstyle     instance
 
-require "nixio.util"
-
 local fs = require "nixio.fs"
 local uci = require "luci.model.uci"
 local util = require "luci.util"
+local nutil = require "nixio.util"
 local table = require "table"
 local string = require "string"
 
@@ -405,11 +404,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 = nixio.util.consume(fs.glob(self.schemedir .. '/*/' .. shm))
+               local files = nutil.consume((fs.glob(self.schemedir .. '/*/' .. shm)))
 
                if #files > 0 then
                        local ok, err
-                       for file in files do
+                       for _, file in ipairs(files) do
                                if not fs.access(file) then
                                        return false, so:error(ERR.SME_READ(so,file))
                                end
index e8f65e3..4971033 100644 (file)
@@ -176,7 +176,7 @@ function Template.__init__(self, name)
                local tplmt = fs.stat(sourcefile, "mtime") or fs.stat(sourcefile .. ".htm", "mtime")
                local commt = fs.stat(compiledfile, "mtime")
                
-               if not fs.mtime(cdir) then
+               if not fs.stat(cdir, "mtime") then
                        fs.mkdirr(cdir)
                        fs.chmod(fs.dirname(cdir), 777)
                end
index 0b37abb..cd62b80 100644 (file)
@@ -54,7 +54,7 @@ $Id$
        </fieldset>
        <br />
 
-       <% if fs.access("/proc/net/ipv6_route") then style = true %>
+       <% if nixio.fs.access("/proc/net/ipv6_route") then style = true %>
        <fieldset class="cbi-section" id="cbi-table-table">
                <legend><%:a_n_routes_kernel6%></legend>