Skip to content

Commit

Permalink
trying to be overprotected by truncating buffer on close
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikaze committed Mar 6, 2023
1 parent db22bca commit 907b8cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/aiofm/protocols/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def close(self):
self.flush()
self.seek(0)
self.s3_client.upload_fileobj(self, Bucket=self.bucket_name, Key=self.object_key)
self.seek(0)
self.truncate()
super().close()

def __enter__(self):
Expand Down

0 comments on commit 907b8cc

Please sign in to comment.