Merge pull request #2579 from KyleSanderson/patch-1

filer.copy: don't crash when volume creation fails
This commit is contained in:
Chris Lu 2022-01-11 22:56:14 -08:00 committed by GitHub
commit dbc6ed6832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -482,7 +482,8 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
}) })
}) })
if err != nil { if err != nil {
fmt.Printf("Failed to assign from %v: %v\n", worker.options.masters, err) uploadError = fmt.Errorf("Failed to assign from %v: %v\n", worker.options.masters, err)
return
} }
targetUrl := "http://" + assignResult.Location.Url + "/" + assignResult.FileId targetUrl := "http://" + assignResult.Location.Url + "/" + assignResult.FileId