mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-31 02:27:01 -04:00 
			
		
		
		
	MOBI metadata: Don't leave around a styles.css file when trying to extract embedded metadata
This commit is contained in:
		
							parent
							
								
									b433d2db0e
								
							
						
					
					
						commit
						a07585ef25
					
				| @ -21,7 +21,7 @@ except ImportError: | ||||
| 
 | ||||
| from lxml import html, etree | ||||
| 
 | ||||
| from calibre import entity_to_unicode | ||||
| from calibre import entity_to_unicode, CurrentDir | ||||
| from calibre.utils.filenames import ascii_filename | ||||
| from calibre.ptempfile import TemporaryDirectory | ||||
| from calibre.ebooks import DRMError | ||||
| @ -790,6 +790,7 @@ def get_metadata(stream): | ||||
|                 mi = mh.exth.mi | ||||
|         else: | ||||
|             with TemporaryDirectory('_mobi_meta_reader') as tdir: | ||||
|                 with CurrentDir(tdir): | ||||
|                     mr = MobiReader(stream, log) | ||||
|                     parse_cache = {} | ||||
|                     mr.extract_content(tdir, parse_cache) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user