From 142a561a9364cd7ba3df0a39d93d3fcb4631a296 Mon Sep 17 00:00:00 2001 From: asoseil Date: Sat, 16 Dec 2017 17:34:48 +0100 Subject: [PATCH] validation fixed --- realize/projects.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/realize/projects.go b/realize/projects.go index e5f9e24..08b7303 100644 --- a/realize/projects.go +++ b/realize/projects.go @@ -355,15 +355,14 @@ func (p *Project) Validate(path string, fiche bool) bool { if !array(e, p.Watcher.Exts) { return false } - } else { - separator := string(os.PathSeparator) - // supported paths - for _, v := range p.Watcher.Ignore { - s := append([]string{p.Path}, strings.Split(v, separator)...) - abs, _ := filepath.Abs(filepath.Join(s...)) - if path == abs || strings.HasPrefix(path, abs+separator) { - return false - } + } + separator := string(os.PathSeparator) + // supported paths + for _, v := range p.Watcher.Ignore { + s := append([]string{p.Path}, strings.Split(v, separator)...) + abs, _ := filepath.Abs(filepath.Join(s...)) + if path == abs || strings.HasPrefix(path, abs+separator) { + return false } } // file check