]> wimlib.net Git - wimlib/blobdiff - src/resource.c
dentry_first_lte() -> dentry_unnamed_lte()
[wimlib] / src / resource.c
index 3c573f1c9131d4cfb0af8f1ff8e68b87964366b0..0c7a4cf9b40f3a929ec459188e7239fc96051604 100644 (file)
@@ -882,7 +882,9 @@ static int write_wim_resource(struct lookup_table_entry *lte,
                }
        }
 
-       if (new_compressed_size > original_size) {
+       if (new_compressed_size >= original_size &&
+           out_ctype != WIM_COMPRESSION_TYPE_NONE && !raw)
+       {
                /* Oops!  We compressed the resource to larger than the original
                 * size.  Write the resource uncompressed instead. */
                if (fseeko(out_fp, file_offset, SEEK_SET) != 0) {