better error message if directory is not found

This commit is contained in:
Chris Lu 2013-07-13 22:01:48 -07:00
parent 76ba0021e5
commit ddf4f27a56

View File

@ -125,6 +125,7 @@ func runUpload(cmd *Command, args []string) bool {
return false
}
filepath.Walk(*uploadDir, func(path string, info os.FileInfo, err error) error {
if err == nil {
if !info.IsDir() {
results, e := submit([]string{path})
bytes, _ := json.Marshal(results)
@ -133,6 +134,9 @@ func runUpload(cmd *Command, args []string) bool {
return e
}
}
} else {
fmt.Println(err)
}
return err
})
} else {