diff --git a/src/techui_builder/builder.py b/src/techui_builder/builder.py index 6593f28..b11530d 100644 --- a/src/techui_builder/builder.py +++ b/src/techui_builder/builder.py @@ -339,6 +339,11 @@ def _extract_action_button_file_from_embedded( ) -> ObjectifiedElement: file_path = Path(file_elem.text.strip() if file_elem.text else "") file_path = dest_path.joinpath(file_path) + if not file_path.exists(): + rel_file_path = Path(str(file_elem.base)).relative_to( + dest_path.absolute(), walk_up=True + ) + file_path = dest_path.joinpath(rel_file_path) tree = objectify.parse(file_path.absolute()) root: ObjectifiedElement = tree.getroot()