Skip to content

Commit

Permalink
Fix bug were SlowDown retries could result in BadDigest failures for …
Browse files Browse the repository at this point in the history
…small files (#731)
  • Loading branch information
MatthijsPiek committed May 5, 2023
1 parent 9954eea commit f2425f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,8 +1107,9 @@ async def _put_file(

with open(lpath, "rb") as f0:
if size < min(5 * 2**30, 2 * chunksize):
chunk = f0.read()
await self._call_s3(
"put_object", Bucket=bucket, Key=key, Body=f0, **kwargs
"put_object", Bucket=bucket, Key=key, Body=chunk, **kwargs
)
callback.relative_update(size)
else:
Expand Down

0 comments on commit f2425f0

Please sign in to comment.