updater: fix deleting the game root directory lmao

This commit is contained in:
2022-11-02 12:56:53 +07:00
parent 0b51be1649
commit 727b7e9b44
2 changed files with 3 additions and 1 deletions

View File

@ -387,6 +387,8 @@ class Installer:
deletefiles = archive.read("deletefiles.txt").decode().split("\n")
for file in deletefiles:
current_game_file = Path(self._gamedir.joinpath(file))
if current_game_file == self._gamedir:
continue
if not current_game_file.exists():
continue
if current_game_file.is_file():