mirror of
https://github.com/go-gitea/gitea
synced 2024-09-11 00:47:00 +02:00
Prevent Stats Indexer reporting error if repo dir missing (#18870)
Repositories missing their directory should not report an error from the stats indexer. Close #18847 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
2f2f11e45d
commit
f1c6cf7c51
@ -37,6 +37,9 @@ func (db *DBIndexer) Index(id int64) error {
|
||||
|
||||
gitRepo, err := git.OpenRepositoryCtx(ctx, repo.RepoPath())
|
||||
if err != nil {
|
||||
if err.Error() == "no such file or directory" {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
defer gitRepo.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user