diff --git a/go/weed/upload.go b/go/weed/upload.go index d05930165..2e3a3f4b1 100644 --- a/go/weed/upload.go +++ b/go/weed/upload.go @@ -125,13 +125,17 @@ func runUpload(cmd *Command, args []string) bool { return false } filepath.Walk(*uploadDir, func(path string, info os.FileInfo, err error) error { - if !info.IsDir() { - results, e := submit([]string{path}) - bytes, _ := json.Marshal(results) - fmt.Println(string(bytes)) - if e != nil { - return e + if err == nil { + if !info.IsDir() { + results, e := submit([]string{path}) + bytes, _ := json.Marshal(results) + fmt.Println(string(bytes)) + if e != nil { + return e + } } + } else { + fmt.Println(err) } return err })