From 79f8c9ecedbf986b52b13de93fd859c91f343145 Mon Sep 17 00:00:00 2001 From: Ollie Copping Date: Thu, 22 Jan 2026 11:12:37 +0000 Subject: [PATCH] Adds another route to determine file path of a file element when generating the JsonMap --- src/techui_builder/builder.py | 5 +++++ 1 file changed, 5 insertions(+) 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()