]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
write.c: ensure that 'old_integrity_table' is always freed
[wimlib] / src / win32_apply.c
index c35fbec26b7b769099b94ce930d1eef8013d45f5..9ed563bb78d7e0996bc6810bc42980f70eeedfb6 100644 (file)
@@ -686,8 +686,8 @@ start_wimboot_extraction(struct list_head *dentry_list, struct win32_apply_ctx *
        int ret;
        struct wim_dentry *dentry;
 
-       if (!wim_info_get_wimboot(ctx->common.wim->wim_info,
-                                 ctx->common.wim->current_image))
+       if (!xml_get_wimboot(ctx->common.wim->xml_info,
+                            ctx->common.wim->current_image))
                WARNING("The WIM image is not marked as WIMBoot compatible.  This usually\n"
                        "          means it is not intended to be used to back a Windows operating\n"
                        "          system.  Proceeding anyway.");
@@ -989,6 +989,9 @@ open_target_directory(struct win32_apply_ctx *ctx)
        ctx->attr.Length = sizeof(ctx->attr);
        ctx->attr.RootDirectory = NULL;
        ctx->attr.ObjectName = &ctx->target_ntpath;
+
+       /* Don't use FILE_OPEN_REPARSE_POINT here; we want the extraction to
+        * happen at the directory "pointed to" by the reparse point. */
        status = (*func_NtCreateFile)(&ctx->h_target,
                                      FILE_TRAVERSE,
                                      &ctx->attr,
@@ -998,7 +1001,6 @@ open_target_directory(struct win32_apply_ctx *ctx)
                                      FILE_SHARE_VALID_FLAGS,
                                      FILE_OPEN_IF,
                                      FILE_DIRECTORY_FILE |
-                                             FILE_OPEN_REPARSE_POINT |
                                              FILE_OPEN_FOR_BACKUP_INTENT,
                                      NULL,
                                      0);
@@ -2938,8 +2940,8 @@ win32_extract(struct list_head *dentry_list, struct apply_ctx *_ctx)
                        goto out;
        }
 
-       ctx->windows_build_number = wim_info_get_windows_build_number(ctx->common.wim->wim_info,
-                                                                     ctx->common.wim->current_image);
+       ctx->windows_build_number = xml_get_windows_build_number(ctx->common.wim->xml_info,
+                                                                ctx->common.wim->current_image);
 
        dentry_count = count_dentries(dentry_list);