[Python-checkins] r59769 - python/trunk/Lib/ntpath.py

georg.brandl python-checkins at python.org
Sun Jan 6 15:17:36 CET 2008


Author: georg.brandl
Date: Sun Jan 6 15:17:36 2008
New Revision: 59769
Modified:
 python/trunk/Lib/ntpath.py
Log:
#1696393: don't check for '.' and '..' in ntpath.walk since
they aren't returned from os.listdir anymore.
Reported by Michael Haggerty.
Modified: python/trunk/Lib/ntpath.py
==============================================================================
--- python/trunk/Lib/ntpath.py	(original)
+++ python/trunk/Lib/ntpath.py	Sun Jan 6 15:17:36 2008
@@ -254,12 +254,10 @@
 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'.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /