mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix write() call
This commit is contained in:
@@ -879,7 +879,7 @@ class file_mixin:
|
||||
raise NotImplementedError("Writing .ifcXML files is not supported")
|
||||
if format == ".ifcZIP":
|
||||
return self.write(path, ".ifc", zipped=True)
|
||||
self.write(str(path))
|
||||
self._write(str(path))
|
||||
|
||||
if zipped:
|
||||
unzipped_path = path.with_suffix(format)
|
||||
|
||||
@@ -224,7 +224,7 @@ private:
|
||||
throw IfcParse::IfcException("Only entities with ids are supported for get_total_inverses. Provided entity: '" + e.declaration().name() + "'.");
|
||||
}
|
||||
|
||||
void write(const std::string& fn) {
|
||||
void _write(const std::string& fn) {
|
||||
std::ofstream f(IfcUtil::path::from_utf8(fn).c_str());
|
||||
if (!f.good()) {
|
||||
throw std::runtime_error("Failed to write to path: '" + fn + "', check folder and file permissions.");
|
||||
|
||||
Reference in New Issue
Block a user