diff --git a/realize/projects.go b/realize/projects.go index 0490e31..137b34e 100644 --- a/realize/projects.go +++ b/realize/projects.go @@ -196,14 +196,15 @@ func (p *Project) Reload(path string, stop <-chan bool) { } // Go supported tools if len(path) > 0 { - fi, err := os.Stat(path) - if filepath.Ext(path) == "" { - fi, err = os.Stat(path) + pathDir := filepath.Dir(path) + fi, err := os.Stat(pathDir) + if filepath.Ext(pathDir) == "" { + fi, err = os.Stat(pathDir) } if err != nil { p.Err(err) } - p.tools(stop, path, fi) + p.tools(stop, pathDir, fi) } // Prevent fake events on polling startup p.init = true