Compare commits

...

2 Commits

Author SHA1 Message Date
Gilbert Chen
670cbcd776 Bump version to 2.6.2 2020-08-30 22:14:58 -04:00
Gilbert Chen
fd469bae9e Check the returned value of Close() when uploading a chunk file via SFTP. 2020-08-29 22:22:51 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -2114,7 +2114,7 @@ func main() {
app.Name = "duplicacy"
app.HelpName = "duplicacy"
app.Usage = "A new generation cloud backup tool based on lock-free deduplication"
app.Version = "2.6.1" + " (" + GitCommit + ")"
app.Version = "2.6.2" + " (" + GitCommit + ")"
// If the program is interrupted, call the RunAtError function.
c := make(chan os.Signal, 1)

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 {