Skip to content

Commit

Permalink
fix(search): allow indexed check (close #3103)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jan 19, 2023
1 parent 98872a8 commit 9b99e8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/search/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func BuildIndex(ctx context.Context, indexPaths, ignorePaths []string, maxDepth
objCount uint64 = 0
fi model.Obj
)
log.Infof("build index for: %+v", indexPaths)
log.Infof("ignore paths: %+v", ignorePaths)
Running.Store(true)
Quit = make(chan struct{}, 1)
indexMQ := mq.NewInMemoryMQ[ObjWithParent]()
Expand Down
3 changes: 2 additions & 1 deletion internal/search/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ func updateIgnorePaths() {
res, err := base.RestyClient.R().Get(url)
if err == nil {
allowIndexed = utils.Json.Get(res.Body(), "data", conf.AllowIndexed).ToBool()
v3Visited[addition.Address] = allowIndexed
}
}
if allowIndexed {
if !allowIndexed {
ignorePaths = append(ignorePaths, storage.GetStorage().MountPath)
}
} else {
Expand Down

0 comments on commit 9b99e8a

Please sign in to comment.