From 34c7642ea30c1dcd136ea440e2fac7b6a4f6f8ce Mon Sep 17 00:00:00 2001 From: tmtx Date: Sat, 3 Feb 2018 20:56:37 +0200 Subject: [PATCH] Check error right away --- realize/projects.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/realize/projects.go b/realize/projects.go index b11c0b2..3ee3ff3 100644 --- a/realize/projects.go +++ b/realize/projects.go @@ -364,10 +364,10 @@ func (p *Project) Validate(path string, fcheck bool) bool { // file check if fcheck { fi, err := os.Stat(path) - if !fi.IsDir() && ext(path) == "" { + if err != nil { return false } - if err != nil { + if !fi.IsDir() && ext(path) == "" { return false } if fi.Size() > 0 {