aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/issues/bleve.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/issues/bleve.go')
-rw-r--r--modules/indexer/issues/bleve.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/indexer/issues/bleve.go b/modules/indexer/issues/bleve.go
index 655bc7dd17..a1f51dba50 100644
--- a/modules/indexer/issues/bleve.go
+++ b/modules/indexer/issues/bleve.go
@@ -10,6 +10,7 @@ import (
"strconv"
"code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/util"
"github.com/blevesearch/bleve"
"github.com/blevesearch/bleve/analysis/analyzer/custom"
"github.com/blevesearch/bleve/analysis/token/lowercase"
@@ -86,14 +87,14 @@ func openIndexer(path string, latestVersion int) (bleve.Index, error) {
if metadata.Version < latestVersion {
// the indexer is using a previous version, so we should delete it and
// re-populate
- return nil, os.RemoveAll(path)
+ return nil, util.RemoveAll(path)
}
index, err := bleve.Open(path)
if err != nil && err == upsidedown.IncompatibleVersion {
// the indexer was built with a previous version of bleve, so we should
// delete it and re-populate
- return nil, os.RemoveAll(path)
+ return nil, util.RemoveAll(path)
} else if err != nil {
return nil, err
}