summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorneonene <53406459+neonene@users.noreply.github.com>2022-01-13 23:35:42 (GMT)
committerGitHub <noreply@github.com>2022-01-13 23:35:42 (GMT)
commitd4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1 (patch)
treececdf1d08cb790283d061b8263086354976c4939 /Lib/ntpath.py
parentb8ddf7e794e5316981016d6d014862e3c4ce149a (diff)
downloadcpython-d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1.zip
cpython-d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1.tar.gz
cpython-d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1.tar.bz2
bpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571)
This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.
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 58483a0..041ebc7 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -551,7 +551,7 @@ else: # use native Windows method on Windows
def abspath(path):
"""Return the absolute version of a path."""
try:
- return normpath(_getfullpathname(path))
+ return _getfullpathname(normpath(path))
except (OSError, ValueError):
return _abspath_fallback(path)