Skip to content

Commit

Permalink
fix: paths on windows by replacing \ with /
Browse files Browse the repository at this point in the history
  • Loading branch information
abraemer committed Jan 21, 2025
1 parent 59f5dc7 commit 1984be8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/opossum_lib/opossum_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def create_attribution_mapping(
] = {}

def process_node(node: Resource) -> None:
path = str(node.path)
path = str(node.path).replace("\\", "/")
if not path.startswith("/"):
# the / is required by OpossumUI
path = "/" + path
Expand Down Expand Up @@ -133,7 +133,9 @@ def to_opossum_file_format(self) -> opossum_file.ResourceInFile:
return 1
else:
return {
str(child.path.relative_to(self.path)): child.to_opossum_file_format()
str(child.path.relative_to(self.path)).replace(
"\\", "/"
): child.to_opossum_file_format()
for child in self.children.values()
}

Expand Down

0 comments on commit 1984be8

Please sign in to comment.