Skip to content

Commit

Permalink
Check the returned value of Close() when uploading a chunk file via S…
Browse files Browse the repository at this point in the history
…FTP.
  • Loading branch information
gilbertchen committed Aug 30, 2020
1 parent acef017 commit fd469ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/duplicacy_sftpstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,11 @@ func (storage *SFTPStorage) UploadFile(threadIndex int, filePath string, content
file.Close()
return err
}
file.Close()

err = file.Close()
if err != nil {
return err
}

err = storage.getSFTPClient().Rename(temporaryFile, fullPath)
if err != nil {
Expand Down

0 comments on commit fd469ba

Please sign in to comment.