summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py6
1 files changed, 6 insertions, 0 deletions
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 @@ def join(a, *p):
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