mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 15:31:26 +00:00
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:
@@ -173,7 +173,9 @@ func cleanDir(dir string) {
|
|||||||
tmpPath := path.Join(revel.AppPath, dir)
|
tmpPath := path.Join(revel.AppPath, dir)
|
||||||
f, err := os.Open(tmpPath)
|
f, err := os.Open(tmpPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
revel.ERROR.Println("Failed to clean dir:", err)
|
if !os.IsNotExist(err) {
|
||||||
|
revel.ERROR.Println("Failed to clean dir:", err)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
infos, err := f.Readdir(0)
|
infos, err := f.Readdir(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user