From: Jo-Philipp Wich Date: Wed, 19 Dec 2012 00:37:39 +0000 (+0000) Subject: luci-0.11: merge r9560 X-Git-Tag: 0.11.0~5 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8df855a6acb5879f27420fb53b103af467c57053;p=project%2Fluci.git luci-0.11: merge r9560 --- 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