Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Dec 31, 2024
1 parent cf0a468 commit 58d89c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions comfy_cli/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ def zip_files(zip_filename):

with zipfile.ZipFile(zip_filename, "w", zipfile.ZIP_DEFLATED) as zipf:
for root, dirs, files in os.walk("."):
if ".git" in dirs: # Still skip .git directory
if ".git" in dirs:
dirs.remove(".git")
for file in files:
file_path = os.path.join(root, file)
if zip_filename in file_path: # Skip the zip file itself
# Skip zipping the zip file itself
if zip_filename in file_path:
continue
relative_path = os.path.relpath(file_path, start=".")
zipf.write(file_path, relative_path)
Expand Down

0 comments on commit 58d89c6

Please sign in to comment.