mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use fully encoded url for xdg-open
This commit is contained in:
parent
0fc95de045
commit
4d45b5a6f5
@ -1470,7 +1470,7 @@ def open_url(qurl):
|
|||||||
print('QDesktopServices::openUrl() failed for url:', qurl, file=sys.stderr)
|
print('QDesktopServices::openUrl() failed for url:', qurl, file=sys.stderr)
|
||||||
if islinux:
|
if islinux:
|
||||||
import subprocess
|
import subprocess
|
||||||
cmd = ['xdg-open', qurl.toLocalFile() if qurl.isLocalFile() else qurl.toString()]
|
cmd = ['xdg-open', qurl.toLocalFile() if qurl.isLocalFile() else qurl.toString(QUrl.ComponentFormattingOption.FullyEncoded)]
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print('Running opener:', cmd)
|
print('Running opener:', cmd)
|
||||||
subprocess.Popen(cmd, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
subprocess.Popen(cmd, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user