From acd457babeee9de1e30db158dc5c94faf9342cf5 Mon Sep 17 00:00:00 2001 From: tretrauit Date: Thu, 6 Jun 2024 20:17:22 +0700 Subject: [PATCH] fix(repair): join game path with pkg_version --- vollerei/common/functions.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/vollerei/common/functions.py b/vollerei/common/functions.py index 6adecdd..2b43216 100644 --- a/vollerei/common/functions.py +++ b/vollerei/common/functions.py @@ -157,18 +157,17 @@ def repair_game( pkg_version = [] if not pkg_version_file.is_file(): try: - game.repair_file("pkg_version", game_info=game_info) + game.repair_file(game.path.joinpath("pkg_version"), game_info=game_info) except Exception as e: raise RepairError( "pkg_version file not found, most likely you need to download the full game again." ) from e - else: - with pkg_version_file.open("r") as f: - for line in f.readlines(): - line = line.strip() - if not line: - continue - pkg_version.append(json.loads(line)) + with pkg_version_file.open("r") as f: + for line in f.readlines(): + line = line.strip() + if not line: + continue + pkg_version.append(json.loads(line)) repair_executor = concurrent.futures.ThreadPoolExecutor() for file in pkg_version: