Skip to content

Commit

Permalink
use root dir to simplify path inside archive
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed Nov 22, 2024
1 parent 6b2605f commit 4422c2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alfalfa_client/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def create_zip(dir: PathLike) -> str:
"""
zip_file_fd, zip_file_path = tempfile.mkstemp(prefix=path.basename(dir), suffix='.zip')
zip_file_path = Path(zip_file_path)
shutil.make_archive(str(zip_file_path.parent / zip_file_path.stem), "zip", None, str(dir))
shutil.make_archive(str(zip_file_path.parent / zip_file_path.stem), "zip", root_dir=str(dir))

return zip_file_path

Expand Down

0 comments on commit 4422c2c

Please sign in to comment.