]> wimlib.net Git - wimlib/blobdiff - src/join.c
Implement workaround for NTFS-3g bug when handling empty DACLs
[wimlib] / src / join.c
index 1045fc7187fccf739643547b412a264b17f626da..cdfd3889d27626f70984774c643daaaf25a86c98 100644 (file)
@@ -157,8 +157,6 @@ wimlib_join(const tchar * const *swm_names,
        WIMStruct **additional_swms;
        unsigned num_additional_swms;
 
-       swm_open_flags |= WIMLIB_OPEN_FLAG_SPLIT_OK;
-
        if (num_swms < 1 || num_swms > 0xffff)
                return WIMLIB_ERR_INVALID_PARAM;
        num_additional_swms = num_swms - 1;
@@ -195,10 +193,12 @@ wimlib_join(const tchar * const *swm_names,
        if (ret)
                goto out_free_swms;
 
+       /* It is reasonably safe to provide, WIMLIB_WRITE_FLAG_STREAMS_OK, as we
+        * have verified that the specified split WIM parts form a spanned set.
+        */
        ret = wimlib_write(swm0, output_path, WIMLIB_ALL_IMAGES,
-                          wim_write_flags, 1, progress_func);
-       wimlib_unreference_resources(swm0, additional_swms,
-                                    num_additional_swms);
+                          wim_write_flags | WIMLIB_WRITE_FLAG_STREAMS_OK,
+                          1, progress_func);
 out_free_swms:
        for (i = 0; i < num_additional_swms; i++)
                wimlib_free(additional_swms[i]);