From: Eric Biggers Date: Mon, 19 Oct 2015 02:36:02 +0000 (-0500) Subject: win32_apply.c: dereference reparse point when opening target dir X-Git-Tag: v1.8.3~33 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=94fd0e32a64292c4e40b98fe542f4be78112e3c9;ds=sidebyside win32_apply.c: dereference reparse point when opening target dir --- diff --git a/NEWS b/NEWS index ffaa3db8..1f27d735 100644 --- 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 diff --git a/src/win32_apply.c b/src/win32_apply.c index a19d138f..9ed563bb 100644 --- a/src/win32_apply.c +++ b/src/win32_apply.c @@ -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);