summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-10-18 13:55:29 +0000
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-10-18 13:55:29 +0000
commit50f7d7e21346875886d0b86c50ff46adb7049b6b (patch)
tree2063a0d1532b4b11b60ac36514b9e77b24dc5481 /Lib/ntpath.py
parent0491047580e18f06727146fcdfc6b46c83ef537e (diff)
downloadcpython-git-50f7d7e21346875886d0b86c50ff46adb7049b6b.tar.gz
Issue #5117: Fixed root directory related issue on posixpath.relpath() and
ntpath.relpath().
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 11a0a3efcb..091a242485 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -488,8 +488,8 @@ def relpath(path, start=curdir):
if not path:
raise ValueError("no path specified")
- start_list = abspath(start).split(sep)
- path_list = abspath(path).split(sep)
+ start_list = [x for x in abspath(start).split(sep) if x]
+ path_list = [x for x in abspath(path).split(sep) if x]
if start_list[0].lower() != path_list[0].lower():
unc_path, rest = splitunc(path)
unc_start, rest = splitunc(start)