Files
Petru Conduraru 4776bd7639 Atomic IFC file writes to prevent corruption on interrupted save (#4797)
file.write() streamed directly onto the target path, so a crash mid-write
left a truncated file with dangling STEP references. Serialize to a temp
file in the same directory, then atomically rename it onto the target.

- New IfcUtil::path::atomic_rename_file: std::rename on POSIX, MoveFileExW
  with MOVEFILE_REPLACE_EXISTING on Windows. Unlike rename_file it never
  unlinks the destination first, so there is no window where it goes missing.
- Fully in C++/swig (per aothms), so the FILE_NAME header is untouched: it
  comes from the model header, not the output path (verified empirically).
- Temp lives next to the target so the rename stays on one filesystem.
- Stream is closed before the rename (Windows cannot move an open file).
- On any write error the temp is removed and the original target is intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 14:22:44 +02:00
..
2024-08-23 20:29:07 +02:00
2024-06-27 11:49:12 +10:00
2025-12-22 18:44:42 +05:00
2025-10-25 15:30:36 +02:00
2025-10-22 21:42:37 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2024-08-23 20:29:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-10-18 09:47:28 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2023-03-29 15:36:07 +02:00
2025-02-21 16:13:39 +01:00
2024-08-23 20:29:07 +02:00
2024-10-07 20:43:19 +02:00
2024-10-07 20:43:19 +02:00
2025-02-21 16:13:39 +01:00
2024-10-07 20:43:19 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2025-10-03 18:12:56 +02:00
2025-10-13 20:47:43 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00
2026-06-24 11:12:21 +02:00
2024-08-23 20:29:07 +02:00
2024-08-23 20:29:07 +02:00
2026-06-12 11:04:18 +02:00
2026-06-11 21:09:56 +02:00
2026-06-11 21:09:56 +02:00