From d558039919b6198a246a6a3fd007276191cb4b2f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 16 May 2024 21:00:35 +0200 Subject: fix: rebuild index when --replace is specified --- internal/index/indexer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/index/indexer.go') diff --git a/internal/index/indexer.go b/internal/index/indexer.go index 7141762..3665785 100644 --- a/internal/index/indexer.go +++ b/internal/index/indexer.go @@ -182,22 +182,22 @@ func OpenOrCreate(dataRoot string, force bool) (*ReadIndex, *WriteIndex, bool, e if force { err = deleteIndex(dataRoot) if err != nil { - return nil, nil, exists, err + return nil, nil, false, err } } idx, err = createIndex(indexPath) if err != nil { - return nil, nil, exists, err + return nil, nil, false, err } meta, err = createMeta(metaPath) if err != nil { - return nil, nil, exists, err + return nil, nil, false, err } err = meta.Save() if err != nil { - return nil, nil, exists, err + return nil, nil, false, err } } else { idx, err = bleve.Open(indexPath) -- cgit 1.4.1