summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2018-10-25 17:46:33 (GMT)
committerGitHub <noreply@github.com>2018-10-25 17:46:33 (GMT)
commit4aa1fda7069642c21c1ee570c4ba44442a657e5e (patch)
tree4e06ea8eda3bd09accb10b55fa21968ffef28805 /Lib/ntpath.py
parent9fd92afff8b168973b42d0637aa29511f128aa23 (diff)
downloadcpython-4aa1fda7069642c21c1ee570c4ba44442a657e5e.zip
cpython-4aa1fda7069642c21c1ee570c4ba44442a657e5e.tar.gz
cpython-4aa1fda7069642c21c1ee570c4ba44442a657e5e.tar.bz2
bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082)
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 24113e7..1b23a15 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -545,8 +545,8 @@ else: # use native Windows method on Windows
def abspath(path):
"""Return the absolute version of a path."""
try:
- return _getfullpathname(path)
- except OSError:
+ return normpath(_getfullpathname(path))
+ except (OSError, ValueError):
return _abspath_fallback(path)
# realpath is a no-op on systems without islink support