luci-0.11: merge r9560
This commit is contained in:
parent
839dcdc012
commit
8df855a6ac
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ function cache_enable(cachepath, mode)
|
|||
mode = mode or "r--r--r--"
|
||||
|
||||
local loader = package.loaders[2]
|
||||
local uid = nixio.getpid("uid")
|
||||
local uid = nixio.getuid()
|
||||
|
||||
if not fs.stat(cachepath) then
|
||||
fs.mkdir(cachepath)
|
||||
|
@ -53,7 +53,7 @@ function cache_enable(cachepath, mode)
|
|||
|
||||
local function _load_sane(file)
|
||||
local stat = fs.stat(file)
|
||||
if stat and stat.uid == uid and stat.mode == mode then
|
||||
if stat and stat.uid == uid and stat.modestr == mode then
|
||||
return loadfile(file)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue