Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.2
-
None
-
Arch Linux, Cinnamon
Description
Hi,
Some application I use had some problems opening a file with spaces in its name. As far as I understand, it looks like a bad escape of the space between the Qt side and gnome's gio tool.
I've put together minimal reproducible example:
from PyQt5.QtGui import QGuiApplication, QDesktopServices from PyQt5.QtCore import QUrl, QTimer import sys def open_file(): QDesktopServices.openUrl(QUrl('file name.txt')) app.exit() app = QGuiApplication(sys.argv) QTimer.singleShot(0, open_file) app.exec_()
Results in:
gio: file:///home/gkatev/Desktop/file%2520name.txt: Error when getting information for file "/home/gkatev/Desktop/file%20name.txt": No such file or directory
This also results in the same gio error:
$ gio open 'file%20name.txt' gio: file:///home/gkatev/Desktop/file%2520name.txt: Error when getting information for file "/home/gkatev/Desktop/file%20name.txt": No such file or directory
This works correctly:
gio open 'file name.txt'