mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Don't close fd for multipage files
This commit is contained in:
		
							parent
							
								
									b8bdd13aac
								
							
						
					
					
						commit
						9f04c2d0a5
					
				| 
						 | 
					@ -744,6 +744,7 @@ class TiffImageFile(ImageFile.ImageFile):
 | 
				
			||||||
        self.readonly = 0
 | 
					        self.readonly = 0
 | 
				
			||||||
        # libtiff closed the fp in a, we need to close self.fp, if possible
 | 
					        # libtiff closed the fp in a, we need to close self.fp, if possible
 | 
				
			||||||
        if hasattr(self.fp, 'close'):
 | 
					        if hasattr(self.fp, 'close'):
 | 
				
			||||||
 | 
					            if not self.__next:
 | 
				
			||||||
                self.fp.close()
 | 
					                self.fp.close()
 | 
				
			||||||
        self.fp = None  # might be shared
 | 
					        self.fp = None  # might be shared
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user