Workaround for people that create symlinks without file extensions to files with file extensions.

Fixes #1929719
This commit is contained in:
Kovid Goyal 2021-05-26 20:18:18 +05:30
parent e1a3458c51
commit 35f6717ae1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -464,6 +464,8 @@ class EbookViewer(MainWindow):
self.load_ebook(entry['pathtoebook']) self.load_ebook(entry['pathtoebook'])
def load_ebook(self, pathtoebook, open_at=None, reload_book=False): 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) performance_monitor('Load of book started', reset=True)
self.actions_toolbar.update_action_state(False) self.actions_toolbar.update_action_state(False)
self.web_view.show_home_page_on_ready = False self.web_view.show_home_page_on_ready = False