Don't start repo with non-directory root (fixes #276)
This commit is contained in:
parent
381f6aeaf6
commit
8fe546c4a2
File diff suppressed because one or more lines are too long
@ -144,6 +144,10 @@
|
|||||||
<th><span class="glyphicon glyphicon-folder-open"></span> Folder</th>
|
<th><span class="glyphicon glyphicon-folder-open"></span> Folder</th>
|
||||||
<td class="text-right">{{repo.Directory}}</td>
|
<td class="text-right">{{repo.Directory}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr ng-if="model[repo.ID].invalid">
|
||||||
|
<th><span class="glyphicon glyphicon-warning-sign"></span> Error</th>
|
||||||
|
<td class="text-right">{{model[repo.ID].invalid}}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span class="glyphicon glyphicon-comment"></span> Synchronization</th>
|
<th><span class="glyphicon glyphicon-comment"></span> Synchronization</th>
|
||||||
<td class="text-right">{{repoStatus(repo.ID)}}</td>
|
<td class="text-right">{{repoStatus(repo.ID)}}</td>
|
||||||
|
|||||||
@ -628,7 +628,10 @@ func (m *Model) ScanRepos() {
|
|||||||
for _, repo := range repos {
|
for _, repo := range repos {
|
||||||
repo := repo
|
repo := repo
|
||||||
go func() {
|
go func() {
|
||||||
m.ScanRepo(repo)
|
err := m.ScanRepo(repo)
|
||||||
|
if err != nil {
|
||||||
|
invalidateRepo(m.cfg, repo, err)
|
||||||
|
}
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -284,10 +284,12 @@ func (w *Walker) ignoreFile(patterns map[string][]string, file string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func checkDir(dir string) error {
|
func checkDir(dir string) error {
|
||||||
if info, err := os.Stat(dir); err != nil {
|
if info, err := os.Lstat(dir); err != nil {
|
||||||
return err
|
return err
|
||||||
} else if !info.IsDir() {
|
} else if !info.IsDir() {
|
||||||
return errors.New(dir + ": not a directory")
|
return errors.New(dir + ": not a directory")
|
||||||
|
} else if debug {
|
||||||
|
l.Debugln("checkDir", dir, info)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user