From a0f493b47154926993a0191bf1e2fc7a692bd2fe Mon Sep 17 00:00:00 2001 From: Petru Conduraru Date: Fri, 10 Jul 2026 15:37:44 +0300 Subject: [PATCH] IfcConvert: report an error when the output file cannot be opened (#438) Converting to a path whose directory does not exist (or is not writable) failed silently: the serializer's ready() check correctly returned false, but IfcConvert deleted the temp file and returned EXIT_FAILURE without any message, so the user saw no reason for the failure. Log a SYS error naming the output file before returning, matching the existing "Unable to open output file" reporting used elsewhere. Co-Authored-By: Claude Opus 4.8 --- src/ifcconvert/IfcConvert.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index 38d245757c..5bb0e94baf 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -890,6 +890,7 @@ int main(int argc, char** argv) { } if (!serializer->ready()) { + logger.Error("SYS", 25, "Unable to open output file '" + IfcUtil::path::to_utf8(output_filename) + "' for writing; check that the directory exists and is writable"); IfcUtil::path::delete_file(IfcUtil::path::to_utf8(output_temp_filename)); write_log(!quiet); return EXIT_FAILURE;