mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +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")
|
raise NotImplementedError("Writing .ifcXML files is not supported")
|
||||||
if format == ".ifcZIP":
|
if format == ".ifcZIP":
|
||||||
return self.write(path, ".ifc", zipped=True)
|
return self.write(path, ".ifc", zipped=True)
|
||||||
self.write(str(path))
|
self._write(str(path))
|
||||||
|
|
||||||
if zipped:
|
if zipped:
|
||||||
unzipped_path = path.with_suffix(format)
|
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() + "'.");
|
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());
|
std::ofstream f(IfcUtil::path::from_utf8(fn).c_str());
|
||||||
if (!f.good()) {
|
if (!f.good()) {
|
||||||
throw std::runtime_error("Failed to write to path: '" + fn + "', check folder and file permissions.");
|
throw std::runtime_error("Failed to write to path: '" + fn + "', check folder and file permissions.");
|
||||||
|
|||||||
Reference in New Issue
Block a user