]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
win32_apply.c: dereference reparse point when opening target dir
[wimlib] / src / win32_apply.c
index a19d138f9002ac80a56d0d49d3312067abc13307..9ed563bb78d7e0996bc6810bc42980f70eeedfb6 100644 (file)
@@ -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);