mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-24 11:43:39 +08:00
better error message if directory is not found
This commit is contained in:
@@ -125,13 +125,17 @@ func runUpload(cmd *Command, args []string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
filepath.Walk(*uploadDir, func(path string, info os.FileInfo, err error) error {
|
filepath.Walk(*uploadDir, func(path string, info os.FileInfo, err error) error {
|
||||||
if !info.IsDir() {
|
if err == nil {
|
||||||
results, e := submit([]string{path})
|
if !info.IsDir() {
|
||||||
bytes, _ := json.Marshal(results)
|
results, e := submit([]string{path})
|
||||||
fmt.Println(string(bytes))
|
bytes, _ := json.Marshal(results)
|
||||||
if e != nil {
|
fmt.Println(string(bytes))
|
||||||
return e
|
if e != nil {
|
||||||
|
return e
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user