Skip to content

Commit fe139c4

Browse files
authored
Merge pull request #38 from forcedotcom/remove_root_folder_from_zip
remove top level folder from zip file
2 parents a26f459 + 3861a37 commit fe139c4

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
@@ -427,8 +427,9 @@ def zip(
427427
# Skip .DS_Store files when adding to zip
428428
for file in files:
429429
if file != ".DS_Store":
430-
file_path = os.path.join(root, file)
431-
zipf.write(file_path)
430+
abs_path = os.path.join(root, file)
431+
arcname = os.path.relpath(abs_path, directory)
432+
zipf.write(abs_path, arcname)
432433

433434
logger.debug(f"Created zip file: {ZIP_FILE_NAME}")
434435

0 commit comments

Comments
 (0)