Merge pull request #162 from tmtx/tmtx/realize_bug

Bug fix - check error right away
This commit is contained in:
Alessio Pracchia 2018-02-03 21:22:12 +01:00 committed by GitHub
commit 4c4c417d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,10 +364,10 @@ func (p *Project) Validate(path string, fcheck bool) bool {
// file check // file check
if fcheck { if fcheck {
fi, err := os.Stat(path) fi, err := os.Stat(path)
if !fi.IsDir() && ext(path) == "" { if err != nil {
return false return false
} }
if err != nil { if !fi.IsDir() && ext(path) == "" {
return false return false
} }
if fi.Size() > 0 { if fi.Size() > 0 {