Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix no index message on disable indexing

sytolk19b71fb7672d
diff --git a/src/renderer/hooks/LocationIndexContextProvider.tsx b/src/renderer/hooks/LocationIndexContextProvider.tsx
index 03ab96e95..f1d848341 100644
--- a/src/renderer/hooks/LocationIndexContextProvider.tsx
+++ b/src/renderer/hooks/LocationIndexContextProvider.tsx
@@ -752,7 +752,10 @@ export const LocationIndexContextProvider = ({
.getPropertiesPromise(folderIndexPath)
.then((indexFile: TS.FileSystemEntry) => {
const indexAge = new Date().getTime() - indexFile.lmdt;
- if (indexFile && indexAge < maxIndexAge.current) {
+ if (
+ loc.disableIndexing ||
+ (indexFile && indexAge < maxIndexAge.current)
+ ) {
return loc
.loadTextFilePromise(folderIndexPath)
.then((jsonContent) => {