Skip to content

Commit

Permalink
Resolve breaking change in S3 SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
hanazuki committed Dec 20, 2023
1 parent 23568d5 commit 4b25ac2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ func (c *Config) handleRead(path string, rf io.ReaderFrom) error {
defer ret.Body.Close()

tsize := ret.ContentLength
c.logf(7, "%s tsize %d", remoteAddr.String(), tsize)
xfer.SetSize(tsize)
if tsize != nil {
c.logf(7, "%s tsize %d", remoteAddr.String(), tsize)
xfer.SetSize(*tsize)
}

rf.ReadFrom(ret.Body)

Expand Down

0 comments on commit 4b25ac2

Please sign in to comment.