mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-03 19:25:49 +01:00
Fix regression that was causing the cover path to be incorrect in the exported OPF file when saving to disk
This commit is contained in:
parent
e74166ea09
commit
ff81ab5db7
1 changed files with 2 additions and 1 deletions
|
|
@ -495,12 +495,13 @@ def render(self, opf_stream, ncx_stream=None):
|
|||
self.manifest.set_basedir(self.base_path)
|
||||
if not self.guide:
|
||||
self.guide = Guide()
|
||||
self.guide.set_basedir(self.base_path)
|
||||
if self.cover:
|
||||
cover = self.cover
|
||||
if not os.path.isabs(cover):
|
||||
cover = os.path.abspath(os.path.join(self.base_path, cover))
|
||||
self.guide.set_cover(cover)
|
||||
self.guide.set_basedir(self.base_path)
|
||||
|
||||
opf = template.generate(__appname__=__appname__, mi=self).render('xml')
|
||||
opf_stream.write(opf)
|
||||
opf_stream.flush()
|
||||
|
|
|
|||
Loading…
Reference in a new issue