ignore maccess change on directory for faster re-indexing

pull/19/head
deadc0de6 4 years ago
parent 6e4c3784fb
commit 818e4fa5e0

@ -59,7 +59,6 @@ class Noder:
def get_node(self, top, path, quiet=False):
'''get the node by internal tree path'''
print(path)
r = anytree.resolver.Resolver('name')
try:
p = os.path.basename(path)
@ -82,6 +81,8 @@ class Noder:
if not node:
self._debug('\tchange: node does not exist')
return None, True
if os.path.isdir(path):
return node, False
# force re-indexing if no maccess
maccess = os.path.getmtime(path)
if not self._has_attr(node, 'maccess') or \

@ -123,7 +123,7 @@ class Walker:
if cnode and changed:
# remove this node and re-add
self._debug('\t{} has changed'.format(path))
self._debug('\tremoving node {} for {}'.format(cnode, path))
self._debug('\tremoving node {} for {}'.format(cnode.name, path))
cnode.parent = None
self._debug('\t{} is to be re-indexed'.format(path))
return True, cnode

Loading…
Cancel
Save