mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Allow to write to unexisting directory
`ifcopenshell.write("/unexisting/path/model.ifc")` was failing without
throwing an error. It now works and a test ensure it works.
This commit is contained in:
@@ -462,6 +462,7 @@ class file(object):
|
||||
>>> model.write("path/to/model.anyextension", format=".ifcXML")
|
||||
"""
|
||||
path = Path(path)
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
if format == None:
|
||||
format = ifcopenshell.util.file.guess_format(path)
|
||||
if format == ".ifcXML":
|
||||
|
||||
Reference in New Issue
Block a user