GH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813)

This commit is contained in:
AN Long 2023-04-07 19:56:00 +08:00 • committed by GitHub
parent 995386071f
commit 4dc339b4d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -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)