]> wimlib.net Git - wimlib/commitdiff
wimlib_overwrite(): Don't force full rebuild of packed WIM
authorEric Biggers <ebiggers3@gmail.com>
Tue, 24 Dec 2013 01:39:14 +0000 (19:39 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 24 Dec 2013 01:45:07 +0000 (19:45 -0600)
Version 3584 WIMs may contain both packed and unpacked streams, no there's
no need to force a full rebuild if WIMLIB_WRITE_FLAG_NO_PACK_STREAMS is
required.

At the same time, a full rebuild is in general required if the default
compression type or chunk size has been changed.

src/write.c

index 98ee80d8fef81df7d3d629b2b02f14ee41278633..7d6ee2df826e3b0ac1e3c80df1ea43bceddbaf54 100644 (file)
@@ -2943,15 +2943,10 @@ can_overwrite_wim_inplace(const WIMStruct *wim, int write_flags)
        if (wim_is_pipable(wim) || (write_flags & WIMLIB_WRITE_FLAG_PIPABLE))
                return false;
 
-       if (wim->hdr.wim_version != WIM_VERSION_PACKED_STREAMS) {
-               if (wim->compression_type != wim->out_compression_type)
-                       return false;
-               if (wim->chunk_size != wim->out_chunk_size)
-                       return false;
-       } else {
-               if (write_flags & WIMLIB_WRITE_FLAG_NO_PACK_STREAMS)
-                       return false;
-       }
+       if (wim->compression_type != wim->out_compression_type)
+               return false;
+       if (wim->chunk_size != wim->out_chunk_size)
+               return false;
 
        return true;
 }