mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	#1696393: don't check for '.' and '..' in ntpath.walk since
they aren't returned from os.listdir anymore. Reported by Michael Haggerty.
This commit is contained in:
		
							parent
							
								
									94da1d6a21
								
							
						
					
					
						commit
						e2a902c669
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		|  | @ -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'. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl