mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-19 10:22:17 +08:00
better error message if directory is not found
This commit is contained in:
parent
76ba0021e5
commit
ddf4f27a56
@ -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
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user