diff --git a/catcli/noder.py b/catcli/noder.py index c753eee..60b5208 100644 --- a/catcli/noder.py +++ b/catcli/noder.py @@ -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 \ diff --git a/catcli/walker.py b/catcli/walker.py index 73afbbb..626793b 100644 --- a/catcli/walker.py +++ b/catcli/walker.py @@ -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