From 4422c2c76a55ae127580255be44d240a07cfe79d Mon Sep 17 00:00:00 2001 From: TShapinsky Date: Fri, 22 Nov 2024 09:36:00 -0700 Subject: [PATCH] use root dir to simplify path inside archive --- alfalfa_client/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alfalfa_client/lib.py b/alfalfa_client/lib.py index 3af089e..29cb62d 100644 --- a/alfalfa_client/lib.py +++ b/alfalfa_client/lib.py @@ -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