diff options
| author | ruki <[email protected]> | 2021-03-13 19:38:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-13 19:38:41 +0800 |
| commit | 1d95a70ff5c3df8fe56120bed92a2de1dbfdf62d (patch) | |
| tree | 03c5a7d847194e084ab3dad2d3661d3866db9b7c /xmake/core/cache/localcache.lua | |
| parent | e376d095211888d905b7238b4e6b2fbf5d48d467 (diff) | |
improve localcache
Diffstat (limited to 'xmake/core/cache/localcache.lua')
| -rw-r--r-- | xmake/core/cache/localcache.lua | 4 |
1 files 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) |
