fix(common): bruh

This commit is contained in:
2025-03-03 17:00:40 +07:00
parent 76bccf6a6f
commit 7707a64733

View File

@ -228,12 +228,12 @@ def install_archive(game: GameABC, archive_file: Path | IOBase) -> None:
archive_path = Path(archive_file)
target_archive = None
if archive_path.suffix == ".001":
archive_path = archive_path.with_suffix("")
if archive_path.suffix == ".zip":
archive_path_merged = archive_path.with_suffix("")
if archive_path_merged.suffix == ".zip":
# .zip split archive
archive = zipfile.ZipFile(archive_path, "r")
else:
target_archive = multivolumefile.open(archive_path, mode='rb')
target_archive = multivolumefile.open(archive_path_merged, mode='rb')
archive = py7zr.SevenZipFile(target_archive, "r")
else:
archive = _open_archive(archive_file)