From 1c3c0358979da71761ac52736e8355c54c7a77f2 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 23 Dec 2013 19:39:14 -0600 Subject: [PATCH] wimlib_overwrite(): Don't force full rebuild of packed WIM 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 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/write.c b/src/write.c index 98ee80d8..7d6ee2df 100644 --- a/src/write.c +++ b/src/write.c @@ -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; } -- 2.43.0