routes: skip unopenable dirs

This commit is contained in:
Anirudh Oppiliappan 2022-12-18 11:43:50 +05:30
parent 08255439fb
commit 8f8f205ce5
No known key found for this signature in database
GPG Key ID: 8A93F96F78C5D4C4
1 changed files with 2 additions and 3 deletions

View File

@ -38,9 +38,8 @@ func (d *deps) Index(w http.ResponseWriter, r *http.Request) {
path := filepath.Join(d.c.Repo.ScanPath, dir.Name()) path := filepath.Join(d.c.Repo.ScanPath, dir.Name())
gr, err := git.Open(path, "") gr, err := git.Open(path, "")
if err != nil { if err != nil {
d.Write500(w) log.Println(err)
log.Printf("opening dir %s: %s", path, err) continue
return
} }
c, err := gr.LastCommit() c, err := gr.LastCommit()