commit | 27f32e938ff51fd5d90a29abbbabc6b81d156f33 | [log] [tgz] |
---|---|---|
author | Anthony Sottile <asottile@umich.edu> | Mon Jan 15 13:39:04 2018 -0800 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Mon Jan 15 23:39:04 2018 +0200 |
tree | 4f119ab169d8ce36474fd1e877553a8395704329 | |
parent | ab95b3074ee43098edf3f23b07fb18ef57ee614d [diff] [blame] |
bpo-32539: Fix OSError for os.listdir() for extended-length paths on Windows (#5169) See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath Paths that begin with `\\?\` are "extended-length paths".
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index c9886d5..cecbb45 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c
@@ -2385,7 +2385,7 @@ if (len > 0) { char ch = namebuf[len-1]; if (ch != SEP && ch != ALTSEP && ch != ':') - namebuf[len++] = '/'; + namebuf[len++] = SEP; strcpy(namebuf + len, "*.*"); }