Skip to content

Commit 254ba02

Browse files
committed
Update _get_parent_directory #57
* If an existing resource is equa lto Codebase.CACHED_RESOURCE, then create that Resource Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 2e64acf commit 254ba02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commoncode/resource.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ def _get_parent_directory(self, path_segments):
20362036
for segment in path_segments:
20372037
path = posixpath_join(current.path, segment)
20382038
existing = resources_by_path.get(path)
2039-
if not existing:
2039+
if not existing or existing == Codebase.CACHED_RESOURCE:
20402040
existing = self._get_or_create_resource(
20412041
name=segment,
20422042
# build the path based on parent

0 commit comments

Comments
 (0)