From 1d95a70ff5c3df8fe56120bed92a2de1dbfdf62d Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 13 Mar 2021 19:38:41 +0800 Subject: improve localcache --- xmake/core/cache/localcache.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/core/cache/localcache.lua b/xmake/core/cache/localcache.lua index c40fe9ba9..d5cc3d03a 100644 --- a/xmake/core/cache/localcache.lua +++ b/xmake/core/cache/localcache.lua @@ -50,7 +50,7 @@ end -- load cache function _instance:load() - if os.isfile(os.projectfile()) then + if os.isdir(config.directory()) then local result = io.load(path.join(config.cachedir(), self:name())) if result ~= nil then self._DATA = result @@ -60,7 +60,7 @@ end -- save cache function _instance:save() - if os.isfile(os.projectfile()) then + if os.isdir(config.directory()) then local ok, errors = io.save(path.join(config.cachedir(), self:name()), self._DATA) if not ok then os.raise(errors) -- cgit v1.3.1