updater: fix deleting the game root directory lmao

This commit is contained in:
tretrauit 2022-11-02 12:56:53 +07:00
parent 0b51be1649
commit 727b7e9b44
No known key found for this signature in database
GPG Key ID: CDDE1C97EE305DAF
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
setup( setup(
name='worthless', name='worthless',
version='2.2.6', version='2.2.7',
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'], packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
url='https://git.froggi.es/tretrauit/worthless-launcher', url='https://git.froggi.es/tretrauit/worthless-launcher',
license='MIT License', license='MIT License',

View File

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