summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2022-07-26 20:24:44 (GMT)
committerGitHub <noreply@github.com>2022-07-26 20:24:44 (GMT)
commit7ac5bb3e6a1cf780aea8164fdba09db993a21d6f (patch)
tree5fd3455f5548d0f95d77fe1414f683ddde53d4a9 /PC
parent51c56f8d7242e98d5d6a3c7a7c51fe40f3da4512 (diff)
downloadcpython-7ac5bb3e6a1cf780aea8164fdba09db993a21d6f.zip
cpython-7ac5bb3e6a1cf780aea8164fdba09db993a21d6f.tar.gz
cpython-7ac5bb3e6a1cf780aea8164fdba09db993a21d6f.tar.bz2
gh-95285: py.exe launcher fails with short argv0 (GH-95295)
Diffstat (limited to 'PC')
-rw-r--r--PC/launcher2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/PC/launcher2.c b/PC/launcher2.c
index c8ed1b0..31b5617 100644
--- a/PC/launcher2.c
+++ b/PC/launcher2.c
@@ -580,6 +580,9 @@ parseCommandLine(SearchInfo *search)
break;
}
}
+ if (tail == search->originalCmdLine && tail[0] == L'"') {
+ ++tail;
+ }
// Without special cases, we can now fill in the search struct
int tailLen = (int)(end ? (end - tail) : wcsnlen_s(tail, MAXLEN));
search->executableLength = -1;