From 8c19b695ea6c96e957722489e3f62013e792cee8 Mon Sep 17 00:00:00 2001 From: Ziad-I <68874104+Ziad-I@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:07:50 +0300 Subject: [PATCH] fix drawings and sheets paths not being normalized which lead to the paths sometimes having both / and \\ --- src/bonsai/bonsai/tool/web.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bonsai/bonsai/tool/web.py b/src/bonsai/bonsai/tool/web.py index ebb1c3fd6d..8ee49093ab 100644 --- a/src/bonsai/bonsai/tool/web.py +++ b/src/bonsai/bonsai/tool/web.py @@ -387,6 +387,7 @@ class Web(bonsai.core.tool.Web): continue reference_name = os.path.basename(reference.Location) reference_path = os.path.join(ifc_file_dir, reference.Location) + reference_path = os.path.normpath(reference_path) sheets_data.append({"name": reference_name, "path": reference_path}) drawings = [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"] @@ -394,6 +395,7 @@ class Web(bonsai.core.tool.Web): document = tool.Drawing.get_drawing_document(drawing) reference_name = os.path.basename(document.Location) reference_path = os.path.join(ifc_file_dir, document.Location) + reference_path = os.path.normpath(reference_path) drawings_data.append({"name": reference_name, "path": reference_path}) cls.send_webui_data(