Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Fix for partial pack creation
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceneNerd committed Nov 1, 2019
1 parent a156b41 commit a94f70a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bcml/data/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version='2.4.8'
version='2.4.9'
12 changes: 8 additions & 4 deletions bcml/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@ def _clean_sarc(file: Path, hashes: dict, tmp_dir: Path):
if not old_sarc:
return
old_files = set(old_sarc.list_files())
del old_sarc
if canon not in hashes:
return
with file.open('rb') as s_file:
Expand All @@ -584,13 +583,18 @@ def _clean_sarc(file: Path, hashes: dict, tmp_dir: Path):
for nest_file in base_sarc.list_files():
canon = nest_file.replace('.s', '.')
ext = Path(canon).suffix
file_data = base_sarc.get_file_data(nest_file).tobytes()
xhash = xxhash.xxh32(util.unyaz_if_needed(file_data)).hexdigest()
if ext in {'.yml', '.bak'}:
continue
if nest_file not in old_files or (xhash != hashes[canon] and ext not in util.AAMP_EXTS):
file_data = base_sarc.get_file_data(nest_file).tobytes()
xhash = xxhash.xxh32(util.unyaz_if_needed(file_data)).hexdigest()
if nest_file in old_files:
old_hash = xxhash.xxh32(
util.unyaz_if_needed(old_sarc.get_file_data(nest_file).tobytes())
).hexdigest()
if nest_file not in old_files or (xhash != old_hash and ext not in util.AAMP_EXTS):
can_delete = False
new_sarc.add_file(nest_file, file_data)
del old_sarc
if can_delete:
del new_sarc
file.unlink()
Expand Down
2 changes: 1 addition & 1 deletion installer.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Application]
name=BCML
version=2.4.8
version=2.4.9
entry_point=bcml.__init__:main
icon=bcml/data/bcml.ico

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='bcml',
version='2.4.8',
version='2.4.9',
author='NiceneNerd',
author_email='[email protected]',
description='A mod manager for The Legend of Zelda: Breath of the Wild on Cemu',
Expand Down

0 comments on commit a94f70a

Please sign in to comment.