Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.12.8, 5.13.2, 5.14.2, 5.15.0 Beta4
-
None
-
-
03cbcba7b2b0e42a04033a008c7fac87595e7f35(dev)
Description
The xdgDesktopPortalOpenFile helper called by QGenericUnixServices::openDocument passes an O_PATH file descriptor to the xdg-desktop-portal D-Bus API:
This fails for Snap packaged applications, but works for Flatpaks due to some backward compatibility code.
Instead, it should pass an O_RDONLY file descriptor to prove that the application has read access to the file it wants opened (since you can open O_PATH file descriptors for files you can't read), which will work for both Flatpaks and Snaps. This is what the GLib code calling this interface does:
https://gitlab.gnome.org/GNOME/glib/-/blob/2.64.2/gio/gopenuriportal.c#L107
This problem was originally reported on the Snapcraft forum here:
Attachments
Issue Links
- is duplicated by
-
QTBUG-81597 QDesktopServices::openUrl, under snap does not open local files
- Closed
- relates to
-
QTBUG-113143 QGenericUnixServices::openDocument / xdgDesktopPortalOpenFile fails in flatpak
- Closed
- links to