mirror of
https://github.com/NohamR/pyzule-rw.git
synced 2026-10-11 02:49:40 +00:00
fix: 1980 files bug, not making ipa
lol
This commit is contained in:
@@ -66,7 +66,7 @@ def main(parser: ArgumentParser) -> None:
|
|||||||
# done !
|
# done !
|
||||||
if OUTPUT_IS_IPA:
|
if OUTPUT_IS_IPA:
|
||||||
print(f"[*] generating ipa with compression level {args.compress}..")
|
print(f"[*] generating ipa with compression level {args.compress}..")
|
||||||
tbhutils.make_ipa(tmpdir, args.o, args.compress)
|
tbhutils.make_ipa(tmpdir, os.path.realpath(args.o), args.compress)
|
||||||
print(f"[*] generated ipa at {args.o}")
|
print(f"[*] generated ipa at {args.o}")
|
||||||
else:
|
else:
|
||||||
if os.path.isdir(args.o):
|
if os.path.isdir(args.o):
|
||||||
|
|||||||
@@ -153,10 +153,17 @@ def extract_deb(deb: str, tweaks: dict[str, str], tmpdir: str) -> None:
|
|||||||
def make_ipa(tmpdir: str, output: str, level: int) -> None:
|
def make_ipa(tmpdir: str, output: str, level: int) -> None:
|
||||||
# ensure names are written as Payload/...
|
# ensure names are written as Payload/...
|
||||||
os.chdir(tmpdir)
|
os.chdir(tmpdir)
|
||||||
|
weird = 0
|
||||||
|
|
||||||
with zipfile.ZipFile(
|
with zipfile.ZipFile(
|
||||||
output, "w", zipfile.ZIP_DEFLATED, compresslevel=level
|
output, "w", zipfile.ZIP_DEFLATED, compresslevel=level
|
||||||
) as zf:
|
) as zf:
|
||||||
for f in iglob("Payload/**", recursive=True):
|
for f in iglob("Payload/**", recursive=True):
|
||||||
|
try:
|
||||||
zf.write(f)
|
zf.write(f)
|
||||||
|
except ValueError:
|
||||||
|
weird += 1
|
||||||
|
|
||||||
|
if weird != 0:
|
||||||
|
print(f"[?] was unable to zip {weird} files due to timestamps")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user