Skip to content

Commit f2f07c9

Browse files
committed
better approach
1 parent c6efc7d commit f2f07c9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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, arcname=file)
389+
abs_path = os.path.join(root, file)
390+
arcname = os.path.relpath(abs_path, directory)
391+
zipf.write(abs_path, arcname)
391392
logger.debug(f"Created zip file: {ZIP_FILE_NAME}")
392393

393394

0 commit comments

Comments
 (0)