From 4388ae46c8dc60c6bf4cd48d7dea640c1576522c Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 6 Sep 2014 00:08:47 -0500 Subject: [PATCH] update_image.c: Don't set RP_FIX until all commands have finished --- src/update_image.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/update_image.c b/src/update_image.c index f14775a7..9a797ec1 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -869,8 +869,6 @@ execute_add_command(struct update_command_journal *j, #ifdef WITH_NTFS_3G wim_get_current_image_metadata(wim)->ntfs_vol = ntfs_vol; #endif - if (add_flags & WIMLIB_ADD_FLAG_RPFIX) - wim->hdr.flags |= WIM_HDR_FLAG_RP_FIX; ret = 0; goto out_destroy_config; out_cleanup_after_capture: @@ -1478,6 +1476,11 @@ wimlib_update_image(WIMStruct *wim, * directories, may have changed. Call xml_update_image_info() to * recalculate these statistics. */ xml_update_image_info(wim, image); + + for (size_t i = 0; i < num_cmds; i++) + if (cmds_copy[i].op == WIMLIB_UPDATE_OP_ADD && + cmds_copy[i].add.add_flags & WIMLIB_ADD_FLAG_RPFIX) + wim->hdr.flags |= WIM_HDR_FLAG_RP_FIX; out_free_cmds_copy: free_update_commands(cmds_copy, num_cmds); out: -- 2.43.0