Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix: injecting folders with -z
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfzxcvbn committed Feb 10, 2024
1 parent c6c11b9 commit 6e64168
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyzule.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
os.makedirs((REAL_EXTRACT_DIR := os.path.join(os.getcwd(), EXTRACT_DIR)))

# i never thought i would write code this bad. im tired.
# oh yeah btw this barely works for shit LMFAO
if args.z:
changing = vars(args)
with ZipFile(args.z) as zf:
Expand All @@ -124,8 +125,7 @@
DYL_NAMES = [name for name in zf.namelist() if name.startswith("inject/")]
zf.extractall(DOT_PATH, DYL_NAMES)
changing["f"] = changing["f"] if changing["f"] else []
for name in DYL_NAMES:
changing["f"].append(f"{DOT_PATH}{name}")
changing["f"] += [entry.path for entry in os.scandir(f"{DOT_PATH}/inject")]
del config["f"]
if "k" in config:
zf.extract("icon.png", DOT_OTHER_PATH)
Expand Down

0 comments on commit 6e64168

Please sign in to comment.