Skip to content

Commit 11ee26d

Browse files
committed
Fix FileNotFoundError when updating overwrite/r6/cache
1 parent c490db4 commit 11ee26d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

games/game_cyberpunk2077.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,10 @@ def _map_cache_files(self):
581581
self._is_cache_file_updated(file, data_path) for file in cache_files
582582
):
583583
qInfo('Updated game files detected, clearing "overwrite/r6/cache/*"')
584-
shutil.rmtree(overwrite_path / "r6/cache")
584+
try:
585+
shutil.rmtree(overwrite_path / "r6/cache")
586+
except FileNotFoundError:
587+
pass
585588
new_cache_files = cache_files
586589
else:
587590
new_cache_files = list(self._unmapped_cache_files(data_path))

0 commit comments

Comments
 (0)