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

File diff suppressed because one or more lines are too long

View File

@ -144,6 +144,10 @@
<th><span class="glyphicon glyphicon-folder-open"></span>&emsp;Folder</th>
<td class="text-right">{{repo.Directory}}</td>
</tr>
<tr ng-if="model[repo.ID].invalid">
<th><span class="glyphicon glyphicon-warning-sign"></span>&emsp;Error</th>
<td class="text-right">{{model[repo.ID].invalid}}</td>
</tr>
<tr>
<th><span class="glyphicon glyphicon-comment"></span>&emsp;Synchronization</th>
<td class="text-right">{{repoStatus(repo.ID)}}</td>

View File

@ -628,7 +628,10 @@ func (m *Model) ScanRepos() {
for _, repo := range repos {
repo := repo
go func() {
m.ScanRepo(repo)
err := m.ScanRepo(repo)
if err != nil {
invalidateRepo(m.cfg, repo, err)
}
wg.Done()
}()
}

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
}