mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Book details: Fix a regression in the previous release that broke the right click search the internet function
Fixes #1842090 ["Search the internet for..." right-click options fail](https://bugs.launchpad.net/calibre/+bug/1842090)
This commit is contained in:
parent
05834f0b42
commit
1156e8209a
@ -1145,6 +1145,8 @@ def open_url(qurl):
|
|||||||
|
|
||||||
|
|
||||||
def safe_open_url(qurl):
|
def safe_open_url(qurl):
|
||||||
|
if isinstance(qurl, string_or_bytes):
|
||||||
|
qurl = QUrl(qurl)
|
||||||
if qurl.scheme() in ('', 'file'):
|
if qurl.scheme() in ('', 'file'):
|
||||||
path = qurl.toLocalFile()
|
path = qurl.toLocalFile()
|
||||||
ext = os.path.splitext(path)[-1].lower()[1:]
|
ext = os.path.splitext(path)[-1].lower()[1:]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user