Fix #3213. Internally, we should always use Unix path separators.

This commit is contained in:
Dion Moult
2023-07-07 17:20:07 +10:00
parent 9944024457
commit 0b823c772e
+2 -2
View File
@@ -103,7 +103,7 @@ class Ifc(blenderbim.core.tool.Ifc):
ifc_path = cls.get_path()
if os.path.isfile(ifc_path):
ifc_path = os.path.dirname(ifc_path)
return uri if not uri or os.path.isabs(uri) else os.path.join(ifc_path, uri)
return (uri if not uri or os.path.isabs(uri) else os.path.join(ifc_path, uri)).replace("\\", "/")
@classmethod
def get_relative_uri(cls, uri):
@@ -112,7 +112,7 @@ class Ifc(blenderbim.core.tool.Ifc):
ifc_path = cls.get_path()
if os.path.isfile(ifc_path):
ifc_path = os.path.dirname(ifc_path)
return os.path.relpath(uri, ifc_path)
return os.path.relpath(uri, ifc_path).replace("\\", "/")
@classmethod
def unlink(cls, element=None, obj=None):