[Python-checkins] CVS: python/dist/src/Lib ntpath.py,1.43,1.44
Tim Peters
tim_one@users.sourceforge.net
Mon, 05 Nov 2001 13:25:04 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv11207/python/Lib
Modified Files:
ntpath.py
Log Message:
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.
Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** ntpath.py 2001/10/10 04:16:20 1.43
--- ntpath.py 2001/11/05 21:25:02 1.44
***************
*** 83,86 ****
--- 83,92 ----
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