X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fwrite.c;h=f3c12ffe4cbc8ffacced2e635ff3a352c773a21f;hb=c3648a1bf94a11ee6eff22cb728f0efe3f4500e9;hp=d8ce2dc326a4b747ff9ac1a083de9c6657dd0744;hpb=0ecb0529b5fcacc1abafa1f3f02a40c44783ada8;p=wimlib diff --git a/src/write.c b/src/write.c index d8ce2dc3..f3c12ffe 100644 --- a/src/write.c +++ b/src/write.c @@ -32,6 +32,13 @@ # include #endif +#include +#include +#include +#include + +#include "wimlib/alloca.h" +#include "wimlib/assert.h" #include "wimlib/chunk_compressor.h" #include "wimlib/endianness.h" #include "wimlib/error.h" @@ -50,14 +57,6 @@ #include "wimlib/write.h" #include "wimlib/xml.h" -#include -#include -#include -#include - -#ifdef HAVE_ALLOCA_H -# include -#endif /* wimlib internal flags used when writing resources. */ #define WRITE_RESOURCE_FLAG_RECOMPRESS 0x00000001 @@ -3248,7 +3247,7 @@ overwrite_wim_inplace(WIMStruct *wim, int write_flags, unsigned num_threads) * 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 @@ -3405,8 +3404,9 @@ can_overwrite_wim_inplace(const WIMStruct *wim, int write_flags) 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