diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index a1107ca7a5..fedebc66d7 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -512,7 +512,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer): self.metadata.show_opf(self.iterator.opf) title = self.iterator.opf.title if not title: - title = os.path.splitext(os.path.basename(pathtoebook)) + title = os.path.splitext(os.path.basename(pathtoebook))[0] self.action_table_of_contents.setDisabled(not self.iterator.toc) if self.iterator.toc: self.toc_model = TOC(self.iterator.toc)