From 57df14f76febf5f94131be0b4bde833d45d8f37c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 21 Apr 2020 14:28:46 -0700 Subject: [PATCH] report error if copying failed --- weed/command/filer_copy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index f596ab23d..0e9e10ee3 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -309,7 +309,7 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err return nil }) if err != nil { - fmt.Printf("Failed to assign from %v: %v\n", worker.options.masters, err) + return fmt.Errorf("Failed to assign from %v: %v\n", worker.options.masters, err) } targetUrl := "http://" + assignResult.Url + "/" + assignResult.FileId