if (unlikely(write_flags & WIMLIB_WRITE_FLAG_UNSAFE_COMPACT)) {
/* Truncate any data the compaction freed up. */
if (ftruncate(wim->out_fd.fd, wim->out_fd.offset)) {
ERROR_WITH_ERRNO("Failed to truncate the output WIM file");
if (unlikely(write_flags & WIMLIB_WRITE_FLAG_UNSAFE_COMPACT)) {
/* Truncate any data the compaction freed up. */
if (ftruncate(wim->out_fd.fd, wim->out_fd.offset)) {
ERROR_WITH_ERRNO("Failed to truncate the output WIM file");