Don't start repo with non-directory root (fixes #276)

This commit is contained in:
Jakob Borg
2014-05-28 06:55:30 +02:00
parent 381f6aeaf6
commit 8fe546c4a2
4 changed files with 13 additions and 4 deletions

View File

@@ -284,10 +284,12 @@ func (w *Walker) ignoreFile(patterns map[string][]string, file string) bool {
}
func checkDir(dir string) error {
if info, err := os.Stat(dir); err != nil {
if info, err := os.Lstat(dir); err != nil {
return err
} else if !info.IsDir() {
return errors.New(dir + ": not a directory")
} else if debug {
l.Debugln("checkDir", dir, info)
}
return nil
}