491
491
# note that the dirname use leads to some extra str copying etc but as
492
492
# there are a limited number of dirs we can be nested under, it should
493
493
# generally find it very fast and not recurse after that.
494
added = _add_one_and_parent(tree, inv, None, FastPath(dirname(path.raw_path)), 'directory', action)
494
added = _add_one_and_parent(tree, inv, None,
495
496
parent_id = inv.path2id(dirname(path.raw_path))
496
497
parent_ie = inv[parent_id]
497
498
_add_one(tree, inv, parent_ie, path, kind, action)