AZW3 Input: Handle empty HTML files

This commit is contained in:
Kovid Goyal 2013-12-26 19:16:07 +05:30
parent 205adafc31
commit 84a2ed5609

View File

@ -204,6 +204,11 @@ class Mobi8Reader(object):
baseptr = baseptr + length
divptr += 1
self.parts.append(skeleton)
if divcnt < 1:
# Empty file
import uuid
aidtext = str(uuid.uuid4())
filename = aidtext + '.html'
self.partinfo.append(Part(skelnum, 'text', filename, skelpos,
baseptr, aidtext))