mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-01 07:49:02 +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
|
||||
}
|
||||
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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user