mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #19398: Extra slash no longer added to sys.path components in case of
empty compile-time PYTHONPATH components. This fixes some tests in -S or -I modes.
This commit is contained in:
commit
a27c064428
3 changed files with 11 additions and 5 deletions
|
@ -762,7 +762,10 @@ calculate_path(void)
|
|||
|
||||
if (defpath[0] != SEP) {
|
||||
wcscat(buf, prefix);
|
||||
wcscat(buf, separator);
|
||||
if (prefixsz >= 2 && prefix[prefixsz - 2] != SEP &&
|
||||
defpath[0] != (delim ? DELIM : L'\0')) { /* not empty */
|
||||
wcscat(buf, separator);
|
||||
}
|
||||
}
|
||||
|
||||
if (delim) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue