#1742: don't raise exception on os.path.relpath("a", "a"), but return os.curdir.

Reported by Jesse Towner.
This commit is contained in:
Georg Brandl 2008-01-06 14:27:15 +00:00
parent e2a902c669
commit 183a084da3
5 changed files with 9 additions and 0 deletions

View file

@ -490,4 +490,6 @@ def relpath(path, start=curdir):
i += 1
rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
if not rel_list:
return curdir
return join(*rel_list)