This commit is contained in:
Kovid Goyal 2010-01-10 02:01:50 -07:00
parent 262c9f9fcc
commit 8caf640ca9

View File

@ -174,11 +174,13 @@ class EbookIterator(object):
plumber.opts, plumber.input_fmt, self.log, plumber.opts, plumber.input_fmt, self.log,
{}, self.base) {}, self.base)
if hasattr(self.pathtoopf, 'manifest'): if processed or plumber.input_fmt.lower() in ('pdf', 'rb') and \
self.pathtoopf = write_oebbook(self.pathtoopf, self.base) not hasattr(self.pathtoopf, 'manifest'):
elif processed or plumber.input_fmt.lower() in ('pdf', 'rb'):
self.pathtoopf = create_oebbook(self.log, self.pathtoopf, plumber.opts, self.pathtoopf = create_oebbook(self.log, self.pathtoopf, plumber.opts,
plumber.input_plugin) plumber.input_plugin)
if hasattr(self.pathtoopf, 'manifest'):
self.pathtoopf = write_oebbook(self.pathtoopf, self.base)
self.opf = OPF(self.pathtoopf, os.path.dirname(self.pathtoopf)) self.opf = OPF(self.pathtoopf, os.path.dirname(self.pathtoopf))
self.language = self.opf.language self.language = self.opf.language