Skip to content

Commit 3861a37

Browse files
committed
remove top level folder from zip file
1 parent e6680a5 commit 3861a37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/datacustomcode/deploy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,9 @@ def zip(
386386
# Skip .DS_Store files when adding to zip
387387
for file in files:
388388
if file != ".DS_Store":
389-
file_path = os.path.join(root, file)
390-
zipf.write(file_path)
389+
abs_path = os.path.join(root, file)
390+
arcname = os.path.relpath(abs_path, directory)
391+
zipf.write(abs_path, arcname)
391392

392393
logger.debug(f"Created zip file: {ZIP_FILE_NAME}")
393394

0 commit comments

Comments
 (0)