From e656b28a79ef64a7a0a9b58265f05cb7c274554c Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 14 Jan 2014 19:53:04 -0600 Subject: [PATCH] wimlib_set_output_{,pack_}_compression_type(): Fix chunk size check --- NEWS | 5 +++++ src/wim.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 16b8ce10..f1e10d97 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,11 @@ Version 1.6.1: For wimcapture, wimoptimize, and wimexport, '--solid' may now be used as an alias for '--pack-streams'. + The default chunk size is now set correctly when changing the + compression type of a WIM (this bug caused 'wimoptimize' to fail when + changing the compression type from None to LZX with no chunk size + explicitly specified, for example). + Version 1.6.0: Support for extracting and updating the new version 3584 WIMs has been added. These WIMs typically pack many streams ("files") together into a diff --git a/src/wim.c b/src/wim.c index f118e793..42f0892e 100644 --- a/src/wim.c +++ b/src/wim.c @@ -469,7 +469,7 @@ wimlib_set_output_compression_type(WIMStruct *wim, int ctype) return ret; /* Reset the chunk size if it's no longer valid. */ - if (!wim_chunk_size_valid(ctype, wim->out_chunk_size)) + if (!wim_chunk_size_valid(wim->out_chunk_size, ctype)) wim->out_chunk_size = wim_default_chunk_size(ctype); return 0; } @@ -483,7 +483,7 @@ wimlib_set_output_pack_compression_type(WIMStruct *wim, int ctype) return ret; /* Reset the chunk size if it's no longer valid. */ - if (!wim_chunk_size_valid(ctype, wim->out_pack_chunk_size)) + if (!wim_chunk_size_valid(wim->out_pack_chunk_size, ctype)) wim->out_pack_chunk_size = wim_default_pack_chunk_size(ctype); return 0; } -- 2.43.0