mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Patch by Gerrit Holl to avoid doing two stat() calls in a row in walk().
This commit is contained in:
parent
0ba33002e1
commit
84a74595f7
1 changed files with 2 additions and 1 deletions
|
@ -267,7 +267,8 @@ of all the files and subdirs in directory "d".
|
|||
for name in names:
|
||||
if name not in exceptions:
|
||||
name = join(top, name)
|
||||
if isdir(name) and not islink(name):
|
||||
st = os.lstat(name)
|
||||
if stat.S_ISDIR(st[stat.ST_MODE]):
|
||||
walk(name, func, arg)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue