Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions s3_tar/s3_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@ def _download_source_file(self, key):
"""
source_key_io = io.BytesIO()
self.s3.download_fileobj(self.source_bucket, key, source_key_io)

# Maybe necessary to flush and seek to the EOF,
# see https://github.com/boto/boto3/issues/1304
source_key_io.flush()
source_key_io.seek(0, 2)

return source_key_io

def _download_source_metadata(self, key):
Expand Down