join_wims(): Preserve some header flags
authorEric Biggers <ebiggers3@gmail.com>
Sun, 26 May 2013 03:46:21 +0000 (22:46 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 26 May 2013 03:46:21 +0000 (22:46 -0500)
NEWS
src/join.c

diff --git a/NEWS b/NEWS
index a8a795e..1d8e643 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ Version 1.4.2:
        Return error code rather than segfaulting when trying to list files from
        a non-first part of a split WIM.
 
+       Joining a WIM will now preserve the RP_FIX and READONLY flags.
+
 Version 1.4.1:
        On Windows, paths given to wimlib-imagex are now treated case
        insensitively.
index 2c459d3..a3eb07b 100644 (file)
@@ -98,6 +98,10 @@ join_wims(WIMStruct **swms, unsigned num_swms,
                        return ret;
        }
 
+       /* Preserve some of the header flags */
+       joined_wim->hdr.flags |= (swms[0]->hdr.flags &
+                             (WIM_HDR_FLAG_RP_FIX | WIM_HDR_FLAG_READONLY));
+
        /* Write lookup table, XML data, and optional integrity table */
        merge_lookup_tables(joined_wim, swms, num_swms);
        free_wim_info(joined_wim->wim_info);