[Python-checkins] CVS: python/dist/src/Lib posixpath.py,1.32,1.33
Skip Montanaro
python-dev@python.org
Sun, 16 Jul 2000 09:52:47 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv410
Modified Files:
posixpath.py
Log Message:
split and join on "/" in commonprefix
Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** posixpath.py 2000/07/12 16:55:57 1.32
--- posixpath.py 2000/07/16 16:52:45 1.33
***************
*** 121,129 ****
n = m[:]
for i in range(len(n)):
! n[i] = n[i].split(os.sep)
! # if os.sep didn't have any effect, try os.altsep
! if os.altsep and len(n[i]) == 1:
! n[i] = n[i].split(os.altsep)
!
prefix = n[0]
for item in n:
--- 121,126 ----
n = m[:]
for i in range(len(n)):
! n[i] = n[i].split("/")
!
prefix = n[0]
for item in n:
***************
*** 133,137 ****
if i == 0: return ''
break
! return os.sep.join(prefix)
--- 130,134 ----
if i == 0: return ''
break
! return "/".join(prefix)