diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 34cfc12179..25e757ee07 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -998,6 +998,13 @@ def do_explode(path, dest): mr = Mobi8Reader(mr, default_log) opf = os.path.abspath(mr()) obfuscated_fonts = mr.encrypted_fonts + # If there are no images then the azw3 input plugin dumps all + # binary records as .unknown images, remove them + if os.path.exists('images') and os.path.isdir('images'): + files = os.listdir('images') + unknown = [x for x in files if x.endswith('.unknown')] + if len(files) == len(unknown): + [os.remove('images/'+f) for f in files] try: os.remove('debug-raw.html') except: