Skip to content

Commit 6e9ca39

Browse files
committed
fix: prepend paths with "/" to account for root
* Files showed up in OpossumUI correctly but attributions where not showing up at all * Prepending a "/" to the paths in resourcesToAttributions fixes this * This is because OpossumUI always considers "/" to be the root for all file paths apparently
1 parent 08a5d9d commit 6e9ca39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/opossum_lib/scancode/resource_tree.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def create_attribution_mapping(
9595
resourcesToAttributions = {} # path -> [attributionUUID]
9696

9797
def process_node(node: Node) -> None:
98-
path = node.file.path
98+
# the / is required by OpossumUI
99+
path = "/" + node.file.path
99100
attributions = get_attribution_info(node.file)
100101
attributionIDs = []
101102
for attribution in attributions:

0 commit comments

Comments
 (0)