aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorAN Long <aisk@users.noreply.github.com>2023-04-07 19:56:00 +0800
committerGitHub <noreply@github.com>2023-04-07 12:56:00 +0100
commit4dc339b4d69195448207e1faecc3e258700daf33 (patch)
tree252c06708b64e198c6beaf2b060ed629b4a3dcd9 /Lib/ntpath.py
parent995386071f96e4cfebfa027a71ca9134e4651d2a (diff)
downloadcpython-4dc339b4d69195448207e1faecc3e258700daf33.tar.gz
cpython-4dc339b4d69195448207e1faecc3e258700daf33.zip
GH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813)
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index e93a5e69600..6e2da79c85d 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -670,7 +670,7 @@ else:
# Non-strict algorithm is to find as much of the target directory
# as we can and join the rest.
- tail = ''
+ tail = path[:0]
while path:
try:
path = _getfinalpathname(path)