Ignore missing temporary directories when booting.

Otherwise, removing your `app/tmp` and `app/routes` folders prior
to booting (e.g., if you add them to your .gitignore and use Travis)
will cause unnecessary FATAL error messages. Addresses
revel/revel#908.
This commit is contained in:
Robert Nubel
2015-07-06 23:22:34 -05:00
parent ccff6efb44
commit 7792db37e2

View File

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