Extract fb2 files from zip container when adding to calibre. Can be disables by disabling the Archive Extract file type plugin. Fixes #6739 (Adding a zip file that contains an fb2 file)

This commit is contained in:
Kovid Goyal 2010-09-08 20:24:30 -06:00
parent 31db5a16dd
commit 3c257cdb56
2 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -70,7 +70,7 @@ class ArchiveExtract(FileTypePlugin):
fname = fnames[0] fname = fnames[0]
ext = os.path.splitext(fname)[1][1:] ext = os.path.splitext(fname)[1][1:]
if ext.lower() not in ('lit', 'epub', 'mobi', 'prc', 'rtf', 'pdf', if ext.lower() not in ('lit', 'epub', 'mobi', 'prc', 'rtf', 'pdf',
'mp3', 'pdb', 'azw', 'azw1'): 'mp3', 'pdb', 'azw', 'azw1', 'fb2'):
return archive return archive
of = self.temporary_file('_archive_extract.'+ext) of = self.temporary_file('_archive_extract.'+ext)