Skip to content

Commit

Permalink
fix lua.fs depends bug and version bump to 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykuku committed Nov 11, 2019
1 parent 8a6f751 commit 53a8bae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk

LUCI_TITLE:=Argon Theme
LUCI_DEPENDS:=
PKG_VERSION:=1.2
PKG_RELEASE:=01-20191109
PKG_VERSION:=1.3
PKG_RELEASE:=01-20191111

include $(TOPDIR)/feeds/luci/luci.mk

Expand Down
14 changes: 12 additions & 2 deletions luasrc/view/themes/argon/header.htm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local fs = require "luci.fs"
local fs = require "nixio.fs"
local nutil = require "nixio.util"

local boardinfo = util.ubus("system", "board")

Expand All @@ -46,6 +47,15 @@
local c = tree
local i, r

function glob(...)
local iter, code, msg = fs.glob(...)
if iter then
return nutil.consume(iter)
else
return nil, code, msg
end
end

-- tag all nodes leading to this page
for i, r in ipairs(request) do
if c.nodes and c.nodes[r] then
Expand Down Expand Up @@ -183,7 +193,7 @@
math.randomseed(os.time())

local bgcount = 0
for f in ipairs(fs.glob("/www/luci-static/argon/img/*")) do
for f in ipairs(glob("/www/luci-static/argon/img/*")) do
bgcount = bgcount + 1
end

Expand Down

0 comments on commit 53a8bae

Please sign in to comment.