mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	Fixed a libimobiledevice resource leak.
This commit is contained in:
		
							parent
							
								
									44e132f8a0
								
							
						
					
					
						commit
						b4c279d176
					
				@ -259,8 +259,6 @@ class libiMobileDevice():
 | 
				
			|||||||
            else:
 | 
					            else:
 | 
				
			||||||
                with open(src, 'rb') as f:
 | 
					                with open(src, 'rb') as f:
 | 
				
			||||||
                    content = bytearray(f.read())
 | 
					                    content = bytearray(f.read())
 | 
				
			||||||
                handle = self._afc_file_open(str(dst), mode='wb')
 | 
					 | 
				
			||||||
                if handle is not None:
 | 
					 | 
				
			||||||
                success = self._afc_file_write(handle, content, mode='wb')
 | 
					                success = self._afc_file_write(handle, content, mode='wb')
 | 
				
			||||||
                self._log(" success: {0}".format(success))
 | 
					                self._log(" success: {0}".format(success))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user