# include <sys/file.h>
#endif
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "wimlib/alloca.h"
+#include "wimlib/assert.h"
#include "wimlib/chunk_compressor.h"
#include "wimlib/endianness.h"
#include "wimlib/error.h"
#include "wimlib/write.h"
#include "wimlib/xml.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
/* wimlib internal flags used when writing resources. */
#define WRITE_RESOURCE_FLAG_RECOMPRESS 0x00000001
* allow any file and metadata resources to appear without returning
* WIMLIB_ERR_RESOURCE_ORDER (due to the fact that we would otherwise
* overwrite these resources). */
- if (!wim->deletion_occurred && !any_images_modified(wim)) {
+ if (!wim->image_deletion_occurred && !any_images_modified(wim)) {
/* If no images have been modified and no images have been
* deleted, a new lookup table does not need to be written. We
* shall write the new XML data and optional integrity table
if (write_flags & WIMLIB_WRITE_FLAG_REBUILD)
return false;
- /* Deletions cause full rebuild by default. */
- if (wim->deletion_occurred && !(write_flags & WIMLIB_WRITE_FLAG_SOFT_DELETE))
+ /* Image deletions cause full rebuild by default. */
+ if (wim->image_deletion_occurred &&
+ !(write_flags & WIMLIB_WRITE_FLAG_SOFT_DELETE))
return false;
/* Pipable WIMs cannot be updated in place, nor can a non-pipable WIM be