mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-02 02:10:45 +01:00
better error message if directory is not found
This commit is contained in:
1 parent
76ba0021e5
commit
ddf4f27a56
1 file changed
+10
-6
+10
-6
@@ -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
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user