SF bug 478425: Change in os.path.join (ntpath.py)
ntpath.join('a', '') was producing 'a' instead of 'a\\' as in 2.1.
Impossible to guess what was ever *intended*, but since split('a\\')
produces ('a', ''), I think it's best if join('a', '') gives 'a\\' back.
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index ed8a2dd..21fadd0 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -82,6 +82,12 @@
path += b
else:
path += "\\" + b
+ else:
+ # path is not empty and does not end with a backslash,
+ # but b is empty; since, e.g., split('a/') produces
+ # ('a', ''), it's best if join() adds a backslash in
+ # this case.
+ path += '\\'
return path