diff --git a/novelwriter/core/index.py b/novelwriter/core/index.py index b05fa952..39bdf0fb 100644 --- a/novelwriter/core/index.py +++ b/novelwriter/core/index.py @@ -681,16 +681,18 @@ class NWIndex(): logException() self._indexBroken = True - # Check that project files are indexed - for fHandle in self.theProject.projFiles: - if fHandle not in self._fileMeta: - self._indexBroken = True - break - - logger.verbose("Index check completed in %.3f ms", (time() - tStart)*1000) - if self._indexBroken: self.clearIndex() + logger.verbose("Index check completed in %.3f ms", (time() - tStart)*1000) + return + + # If the index was ok, we check that project files are indexed + for fHandle in self.theProject.projFiles: + if fHandle not in self._fileMeta: + logger.warning("Item '%s' is not in the index", fHandle) + self.reIndexHandle(fHandle) + + logger.verbose("Index check completed in %.3f ms", (time() - tStart)*1000) return diff --git a/novelwriter/guimain.py b/novelwriter/guimain.py index 2ffffe45..c21fc091 100644 --- a/novelwriter/guimain.py +++ b/novelwriter/guimain.py @@ -545,7 +545,7 @@ class GuiMain(QMainWindow): if self.theIndex.indexBroken: self.makeAlert(self.tr( "The project index is outdated or broken. Rebuilding index." - ), nwAlert.WARN) + ), nwAlert.INFO) self.rebuildIndex() # Make sure the changed status is set to false on things opened