[Python-checkins] CVS: python/dist/src/Lib/distutils util.py,1.58,1.59

Jack Jansen jackjansen@users.sourceforge.net
Sun, 28 Jan 2001 04:23:34 -0800


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv22294

Modified Files:
	util.py 
Log Message:
Remove single "." components from pathnames, and return os.curdir if
the resulting path is empty.


Index: util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/util.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** util.py	2001/01/25 20:10:32	1.58
--- util.py	2001/01/28 12:23:32	1.59
***************
*** 83,86 ****
--- 83,90 ----
  
      paths = string.split(pathname, '/')
+     while '.' in paths:
+         paths.remove('.')
+     if not paths:
+         return os.curdir
      return apply(os.path.join, paths)