1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-12 22:33:28 +00:00

Check the returned value of Close() when uploading a chunk file via SFTP.

This commit is contained in:
Gilbert Chen
2020-08-29 22:22:51 -04:00
parent acef01770a
commit fd469bae9e

View File

@@ -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 {