mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 07:51:14 +00:00
fix: use os.RemoveAll to ensure complete removal of search index
This commit is contained in:
@@ -145,7 +145,7 @@ func RebuildSearchIndex() error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to close search index: %w", err)
|
||||
}
|
||||
err = os.Remove(utils.GetStoragePath() + "/resource_index.bleve")
|
||||
err = os.RemoveAll(utils.GetStoragePath() + "/resource_index.bleve")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to remove search index: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user