Skip to content

Commit

Permalink
fix: folder permissions in zip
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut authored and auvipy committed Aug 28, 2021
1 parent 819d620 commit 613db39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auditwheel/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,14 @@ def dir2zip(in_dir: str, zip_fname: str) -> None:
with zipfile.ZipFile(zip_fname, 'w',
compression=zipfile.ZIP_DEFLATED) as z:
for root, dirs, files in os.walk(in_dir):
for dir in dirs:
dname = os.path.join(root, dir)
out_dname = os.path.relpath(dname, in_dir)
z.write(dname, out_dname)
for file in files:
fname = os.path.join(root, file)
out_fname = os.path.relpath(fname, in_dir)
z.write(os.path.join(root, file), out_fname)
z.write(fname, out_fname)


def tarbz2todir(tarbz2_fname: str, out_dir: str) -> None:
Expand Down

0 comments on commit 613db39

Please sign in to comment.