mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-103220: Fix ntpath.join()
of partial UNC drive with trailing slash (GH-103221)
This commit is contained in:
parent
50b4b15984
commit
b57105ae33
3 changed files with 8 additions and 1 deletions
|
@ -142,7 +142,7 @@ def join(path, *paths):
|
|||
result_path = result_path + p_path
|
||||
## add separator between UNC and non-absolute path
|
||||
if (result_path and not result_root and
|
||||
result_drive and result_drive[-1:] != colon):
|
||||
result_drive and result_drive[-1:] not in colon + seps):
|
||||
return result_drive + sep + result_path
|
||||
return result_drive + result_root + result_path
|
||||
except (TypeError, AttributeError, BytesWarning):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue