diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 06b2293293e..fa2fc29970d 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -254,12 +254,10 @@ def walk(top, func, arg): except os.error: return func(arg, top, names) - exceptions = ('.', '..') for name in names: - if name not in exceptions: - name = join(top, name) - if isdir(name): - walk(name, func, arg) + name = join(top, name) + if isdir(name): + walk(name, func, arg) # Expand paths beginning with '~' or '~user'.