#1742: don't raise exception on os.path.relpath("a", "a"), but return os.curdir.
Reported by Jesse Towner.
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index ee763ad..ee6d0f2 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -398,4 +398,6 @@
     i = len(commonprefix([start_list, path_list]))
 
     rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
+    if not rel_list:
+        return curdir
     return join(*rel_list)