Skip to content

Commit

Permalink
Add comment regarding source of code for reproducible zip archiving i…
Browse files Browse the repository at this point in the history
…n `zip_bag_dir`. [ci skip]
  • Loading branch information
mikedarcy committed Jan 12, 2024
1 parent 42e3e8c commit f8d8136
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bdbag/bdbag_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ def filter_mtime(tarinfo):


def zip_bag_dir(bag_path, zip_file_path, idempotent=False):

# The majority of this code came from https://fekir.info/post/reproducible-zip-archives/ with the exception of the
# buffered writing of file entries (instead of ZipFile.writestr) which was added for scalability reasons.
zipfile = ZipFile(zip_file_path, 'w', ZIP_DEFLATED, allowZip64=True)
entries = []
for root, dirs, files in os.walk(bag_path):
Expand Down

0 comments on commit f8d8136

Please sign in to comment.