From 35f6717ae1c9c2c515342c068c3504a3a8736c93 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 26 May 2021 20:18:18 +0530 Subject: [PATCH] Workaround for people that create symlinks without file extensions to files with file extensions. Fixes #1929719 --- src/calibre/gui2/viewer/ui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/viewer/ui.py b/src/calibre/gui2/viewer/ui.py index 2a7dd21008..3bf13bf922 100644 --- a/src/calibre/gui2/viewer/ui.py +++ b/src/calibre/gui2/viewer/ui.py @@ -464,6 +464,8 @@ class EbookViewer(MainWindow): self.load_ebook(entry['pathtoebook']) def load_ebook(self, pathtoebook, open_at=None, reload_book=False): + if '.' not in os.path.basename(pathtoebook): + pathtoebook = os.path.abspath(os.path.realpath(pathtoebook)) performance_monitor('Load of book started', reset=True) self.actions_toolbar.update_action_state(False) self.web_view.show_home_page_on_ready = False