mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Don’t raise error when cache item has been deleted from another thread
This commit is contained in:
@ -155,9 +155,12 @@ class ContentCache(object):
|
|||||||
continue
|
continue
|
||||||
found = True
|
found = True
|
||||||
if isfile(path):
|
if isfile(path):
|
||||||
remove(path)
|
try:
|
||||||
if not listdir(dirname(path)):
|
remove(path)
|
||||||
util.rmtree_(dirname(path))
|
if not listdir(dirname(path)):
|
||||||
|
util.rmtree_(dirname(path))
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
if found and self._lock_dbindex():
|
if found and self._lock_dbindex():
|
||||||
with open(self._db_path, "w") as fp:
|
with open(self._db_path, "w") as fp:
|
||||||
|
Reference in New Issue
Block a user