mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix #3213. Internally, we should always use Unix path separators.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user