print only valid error msg

This commit is contained in:
Jeevanandam M
2016-05-21 23:14:42 -07:00
parent 63ec7ed487
commit 4f0489d0e6

View File

@@ -181,7 +181,9 @@ func cleanDir(dir string) {
defer f.Close()
infos, err := f.Readdir(0)
if err != nil {
revel.ERROR.Println("Failed to clean dir:", err)
if !os.IsNotExist(err) {
revel.ERROR.Println("Failed to clean dir:", err)
}
} else {
for _, info := range infos {
path := path.Join(tmpPath, info.Name())