Commits

Anonymous committed e15f227

Fix creation of content.opf and toc.ncx if master_doc is in a subdir.

  • Participants
  • Parent commits e4239a8

Comments (0)

Files changed (1)

File sphinx/builders/epub.py

         doctree = self.env.get_and_resolve_doctree(self.config.master_doc,
             self, prune_toctrees=False)
         self.refnodes = self.get_refnodes(doctree, [])
+        master_dir = os.path.dirname(self.config.master_doc)
+        if master_dir:
+            master_dir += '/' # XXX or os.sep?
+            for item in self.refnodes:
+                item['refuri'] = master_dir + item['refuri']
         self.refnodes.insert(0, {
             'level': 1,
             'refuri': self.esc(self.config.master_doc + '.html'),