]> wimlib.net Git - wimlib/commitdiff
wimlib_set_output_{,pack_}_compression_type(): Fix chunk size check
authorEric Biggers <ebiggers3@gmail.com>
Wed, 15 Jan 2014 01:53:04 +0000 (19:53 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 15 Jan 2014 01:57:47 +0000 (19:57 -0600)
NEWS
src/wim.c

diff --git a/NEWS b/NEWS
index 16b8ce1020ba39c8e51b95aa713a7c710b8568f6..f1e10d97b64f01ec743a105521de667f7ecf3f42 100644 (file)
--- 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
index f118e793086774c289eddd9bbf607b0f5caefd9e..42f0892efa2e3674bc53e4f1b9fc6e984527ea40 100644 (file)
--- 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;
 }