summaryrefslogtreecommitdiffstats
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-10-18 12:13:18 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-10-18 12:13:18 (GMT)
commitb08820ad406b9fd291a8707e4bad41cc8486ab08 (patch)
tree4d9ef9284fb34d3e4b0e7bf7a29b60e7d952c433 /Lib/posixpath.py
parent08654e18eed3c8b0224100fe270da618d60d6eb5 (diff)
downloadcpython-b08820ad406b9fd291a8707e4bad41cc8486ab08.zip
cpython-b08820ad406b9fd291a8707e4bad41cc8486ab08.tar.gz
cpython-b08820ad406b9fd291a8707e4bad41cc8486ab08.tar.bz2
Issue #5117: Case normalization was needed on ntpath.relpath(). And
fixed root directory issue on posixpath.relpath(). (Ported working fixes from ntpath)
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 2d68b73..c9829e1 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -447,8 +447,8 @@ def relpath(path, start=None):
if start is None:
start = curdir
- 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]
# Work out how much of the filepath is shared by start and path.
i = len(commonprefix([start_list, path_list]))