diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2010-10-18 13:49:09 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2010-10-18 13:49:09 (GMT) |
commit | 089144e511ca4b388ce8b29ecf2965a8215ff238 (patch) | |
tree | 2cb4c09dc5d4bca6972fd590bae549e0b386ad89 /Lib/posixpath.py | |
parent | fd6a55ec41fe2bd46cf0a5b4ebabb62eda5a19d7 (diff) | |
download | cpython-089144e511ca4b388ce8b29ecf2965a8215ff238.zip cpython-089144e511ca4b388ce8b29ecf2965a8215ff238.tar.gz cpython-089144e511ca4b388ce8b29ecf2965a8215ff238.tar.bz2 |
Merged revisions 85689 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85689 | hirokazu.yamamoto | 2010-10-18 21:13:18 +0900 | 3 lines
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.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index d317ceb..64fe9df 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -444,8 +444,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])) |