summaryrefslogtreecommitdiffhomepage
path: root/libs/core/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/core/luasrc')
-rw-r--r--libs/core/luasrc/ccache.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/core/luasrc/ccache.lua b/libs/core/luasrc/ccache.lua
index c9771af216..56ccbc3efe 100644
--- a/libs/core/luasrc/ccache.lua
+++ b/libs/core/luasrc/ccache.lua
@@ -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