Rewrite project consistency chech as part of the tree class

This commit is contained in:
Veronica Berglyd Olsen
2023-07-21 23:56:48 +02:00
parent f0e372b2ba
commit 3753f5b829
5 changed files with 86 additions and 129 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ class NWIndex:
a rebuild of the index data.
"""
def __init__(self, project):
def __init__(self, project: NWProject):
self._project = project
@@ -197,7 +197,7 @@ class NWIndex:
logger.debug("Checking index")
# Check that all files are indexed
for fHandle in self._project.projFiles:
for fHandle in self._project.storage.scanContent():
if fHandle not in self._itemIndex:
logger.warning("Item '%s' is not in the index", fHandle)
self.reIndexHandle(fHandle)