From: Eric Biggers Date: Wed, 15 Jan 2014 01:53:04 +0000 (-0600) Subject: wimlib_set_output_{,pack_}_compression_type(): Fix chunk size check X-Git-Tag: v1.6.1~42 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=e656b28a79ef64a7a0a9b58265f05cb7c274554c wimlib_set_output_{,pack_}_compression_type(): Fix chunk size check --- 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; }