diff --git a/cyan/logic.py b/cyan/logic.py index 858ca55..9772243 100644 --- a/cyan/logic.py +++ b/cyan/logic.py @@ -66,7 +66,7 @@ def main(parser: ArgumentParser) -> None: # done ! if OUTPUT_IS_IPA: 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}") else: if os.path.isdir(args.o): diff --git a/cyan/tbhutils.py b/cyan/tbhutils.py index efde02b..8fa5f55 100644 --- a/cyan/tbhutils.py +++ b/cyan/tbhutils.py @@ -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: # ensure names are written as Payload/... os.chdir(tmpdir) + weird = 0 with zipfile.ZipFile( output, "w", zipfile.ZIP_DEFLATED, compresslevel=level ) as zf: for f in iglob("Payload/**", recursive=True): - zf.write(f) + try: + zf.write(f) + except ValueError: + weird += 1 + + if weird != 0: + print(f"[?] was unable to zip {weird} files due to timestamps")