mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Issue #6050: Don't fail extracting a directory from a zipfile if
the directory already exists.
This commit is contained in:
		
							parent
							
								
									53b578eba1
								
							
						
					
					
						commit
						0b09c42ffe
					
				
					 3 changed files with 10 additions and 1 deletions
				
			
		|  | @ -971,7 +971,8 @@ def _extract_member(self, member, targetpath, pwd): | |||
|             os.makedirs(upperdirs) | ||||
| 
 | ||||
|         if member.filename[-1] == '/': | ||||
|             os.mkdir(targetpath) | ||||
|             if not os.path.isdir(targetpath): | ||||
|                 os.mkdir(targetpath) | ||||
|             return targetpath | ||||
| 
 | ||||
|         source = self.open(member, pwd=pwd) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martin v. Löwis
						Martin v. Löwis