report error if copying failed

This commit is contained in:
Chris Lu 2020-04-21 14:28:46 -07:00
parent cf54d70311
commit 57df14f76f

View File

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