Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

better error message if directory is not found

Chris Luddf4f27a5648
diff --git a/go/weed/upload.go b/go/weed/upload.go
index d05930165e..2e3a3f4b14 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
})