mirror of
https://github.com/Abdess/retrobios.git
synced 2026-06-19 10:32:47 +00:00
fix: verify functions handle flat zip extraction
This commit is contained in:
parent
6fc2753f3e
commit
9ba8b02ff1
2 changed files with 14 additions and 2 deletions
|
|
@ -2432,6 +2432,11 @@ def _run_verify_packs(args):
|
|||
with zipfile.ZipFile(zip_path) as zf:
|
||||
zf.extractall(extract_dir)
|
||||
|
||||
# Auto-detect flat vs nested extraction
|
||||
is_flat = bool(base_dest) and not os.path.isdir(
|
||||
os.path.join(extract_dir, base_dest)
|
||||
)
|
||||
|
||||
missing = []
|
||||
hash_fail = []
|
||||
ok = 0
|
||||
|
|
@ -2442,7 +2447,7 @@ def _run_verify_packs(args):
|
|||
continue
|
||||
fp = (
|
||||
os.path.join(extract_dir, base_dest, dest)
|
||||
if base_dest
|
||||
if base_dest and not is_flat
|
||||
else os.path.join(extract_dir, dest)
|
||||
)
|
||||
# Case-insensitive fallback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue