Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ceeda0e

Browse files
committed
Treat trailing colon in os.path.join("a:", "b") same way for DOS as in
recent changes to ntpath.py and posixmodule.c. Thanks to Guido for pointing out the inconsistency!
1 parent f86eda5 commit ceeda0e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/dospath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def join(a, *p):
3636
for b in p:
3737
if isabs(b):
3838
path = b
39-
elif path == '' or path[-1:] in '/\\':
39+
elif path == '' or path[-1:] in '/\\:':
4040
path = path + b
4141
else:
4242
path = path + os.sep + b

0 commit comments

Comments
 (0)