diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-01-11 22:56:14 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-11 22:56:14 -0800 |
| commit | dbc6ed68328cac748a0bfccd938dbe0bae819ad4 (patch) | |
| tree | ac15b01075c97640de99d23d8091ec4450f6c477 | |
| parent | 1a7d5b5b5e76fa42b0e2cd8e20d0911861f1d4a0 (diff) | |
| parent | 9e012001becf83dd5476aac25098aea59f4ddddc (diff) | |
| download | seaweedfs-dbc6ed68328cac748a0bfccd938dbe0bae819ad4.tar.xz seaweedfs-dbc6ed68328cac748a0bfccd938dbe0bae819ad4.zip | |
Merge pull request #2579 from KyleSanderson/patch-1
filer.copy: don't crash when volume creation fails
| -rw-r--r-- | weed/command/filer_copy.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index 88ae55e84..185a1d0ff 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -482,7 +482,8 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File, }) }) 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 |
