summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 229f670..869ff2b 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1320,11 +1320,22 @@ ApplicationType(
hFile = CreateFileW(nativeFullPath,
GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL, NULL);
+ FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OPEN_REPARSE_POINT, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
continue;
}
+ if (attr & FILE_ATTRIBUTE_REPARSE_POINT) {
+ /*
+ * But [4f0b5767ac]. Likely a App Execution Alias. This can only
+ * be a Win32 APP. Attempt to ReadFile below will fail. We assume
+ * that if it is on the PATH, and it is a reparse point, it is an
+ * App Execution Alias.
+ */
+ applType = APPL_WIN32;
+ break;
+ }
+
header.e_magic = 0;
ReadFile(hFile, (void *) &header, sizeof(header), &read, NULL);
if (header.e_magic != IMAGE_DOS_SIGNATURE) {