diff options
| author | ruki <[email protected]> | 2019-01-04 22:51:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-01-04 11:09:58 +0800 |
| commit | 76cf129b49dba3abd63de5610900265c63603458 (patch) | |
| tree | c88b20b6a4ab9dfc980e8c2d353059787281fce1 /xmake/core/project/cache.lua | |
| parent | a5d9cb41fef552951bec41ba5f8c4261953f6bd5 (diff) | |
improve project and history cache
Diffstat (limited to 'xmake/core/project/cache.lua')
| -rw-r--r-- | xmake/core/project/cache.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/core/project/cache.lua b/xmake/core/project/cache.lua index 558acb64d..2394b605c 100644 --- a/xmake/core/project/cache.lua +++ b/xmake/core/project/cache.lua @@ -119,11 +119,14 @@ function cache:flush() -- memory cache? ignore it directly if not self._CACHEPATH then - return true + return end -- save to file - return io.save(self._CACHEPATH, self._CACHEDATA) + local ok, errors = io.save(self._CACHEPATH, self._CACHEDATA) + if not ok then + os.raise(errors) + end end -- return module |
