[Python-checkins] CVS: python/dist/src/Lib posixpath.py,1.28,1.29
Guido van Rossum
guido@cnri.reston.va.us
Mon, 28 Feb 2000 09:27:10 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Lib
In directory eric:/projects/python/develop/guido/src/Lib
Modified Files:
posixpath.py
Log Message:
Patch by Gerrit Holl to avoid doing two stat() calls in a row in walk().
Index: posixpath.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** posixpath.py 2000/02/24 02:26:51 1.28
--- posixpath.py 2000/02/28 14:27:07 1.29
***************
*** 268,272 ****
if name not in exceptions:
name = join(top, name)
! if isdir(name) and not islink(name):
walk(name, func, arg)
--- 268,273 ----
if name not in exceptions:
name = join(top, name)
! st = os.lstat(name)
! if stat.S_ISDIR(st[stat.ST_MODE]):
walk(name, func, arg)