mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	
							parent
							
								
									a3f092751a
								
							
						
					
					
						commit
						0fd1291c38
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -1251,9 +1251,11 @@ find_module(char *fullname, char *subname, PyObject *path, char *buf, | ||||||
| 			} | 			} | ||||||
| 			else if (importer == Py_None) { | 			else if (importer == Py_None) { | ||||||
| 				/* No importer was found, so it has to be a file.
 | 				/* No importer was found, so it has to be a file.
 | ||||||
| 				 * Check if the directory is valid. */ | 				 * Check if the directory is valid. | ||||||
|  | 				 * Note that the empty string is a valid path, but | ||||||
|  | 				 * not stat'able, hence the check for len. */ | ||||||
| #ifdef HAVE_STAT | #ifdef HAVE_STAT | ||||||
| 				if (stat(buf, &statbuf) != 0) { | 				if (len && stat(buf, &statbuf) != 0) { | ||||||
| 					/* Directory does not exist. */ | 					/* Directory does not exist. */ | ||||||
| 					PyDict_SetItem(path_importer_cache, | 					PyDict_SetItem(path_importer_cache, | ||||||
| 					               v, Py_False); | 					               v, Py_False); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl