summaryrefslogtreecommitdiff
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 792a9856d5..cc0e4cba1f 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -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)