win32_apply.c: dereference reparse point when opening target dir
authorEric Biggers <ebiggers3@gmail.com>
Mon, 19 Oct 2015 02:36:02 +0000 (21:36 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 19 Oct 2015 02:37:52 +0000 (21:37 -0500)
NEWS
src/win32_apply.c

diff --git a/NEWS b/NEWS
index ffaa3db..1f27d73 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ Version 1.8.3-BETA:
        Improved performance of wimlib_update_image() by delaying the update to
        the WIM's XML document until a write is requested.
 
+       On Windows, the target of an extraction may now be a reparse point.
+
        Several improvements to System Compression (compact mode) support:
 
                wof.sys (or wofadk.sys) is now automatically attached to the
index a19d138..9ed563b 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);