diff --git a/vollerei/common/functions.py b/vollerei/common/functions.py index 7d2d8b8..5192290 100644 --- a/vollerei/common/functions.py +++ b/vollerei/common/functions.py @@ -229,9 +229,12 @@ def install_archive(game: GameABC, archive_file: Path | IOBase) -> None: target_archive = None if archive_path.suffix == ".001": archive_path = archive_path.with_suffix("") - target_archive = multivolumefile.open(archive_path, mode='rb') - # TODO: Implement for .zip file (but I doubt it's needed cuz miHoYo uses 7z) - archive = py7zr.SevenZipFile(target_archive, "r") + if archive_path.suffix == ".zip": + # .zip split archive + archive = zipfile.ZipFile(archive_path, "r") + else: + target_archive = multivolumefile.open(archive_path, mode='rb') + archive = py7zr.SevenZipFile(target_archive, "r") else: archive = _open_archive(archive_file) archive.extractall(game.path)