-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ensure the file chooser only sends file: uris back #213
Comments
A quick test shows that the file chooser already returns file: uris, at least for recent files. |
This little song and dance gets a file:/// URI for most gvfs backends: |
I am stumbling over this as well. I am working on rfd, a cross platform Rust library abstracting over file dialogs on different OSes. On macOS and Windows, the file dialogs only return file paths. But the XDG Desktop Portal allows the file dialog to return arbitrary URIs. I can easily strip off the |
Until this issue is fixed, UX should not show anything to the user: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/48 |
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213 Fix flatpak#820 Don't use Gvfs Remove the need for Gvfs when accessing files mounted with gvfsd-fuse.
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213 Fix flatpak#820 Don't use Gvfs Remove the need for Gvfs when accessing files mounted with gvfsd-fuse.
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213 Fix flatpak#820 Don't use Gvfs Remove the need for Gvfs when accessing files mounted with gvfsd-fuse.
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213 Fix flatpak#820 Don't use Gvfs Remove the need for Gvfs when accessing files mounted with gvfsd-fuse.
By default, xdg-desktop-portal runs with "GIO_USE_VFS=local" to guarantee that it only sends local URIs, but that also means that the user can't access files that are mounted locally using GVfs. This patch filters all the URIs sent and replaces, wherever possible, any remote URI (like sftp://, smb://...) with the corresponding one in the local filesystem created by GVfs. Fix flatpak#213 Fix flatpak#820 Don't use Gvfs Remove the need for Gvfs when accessing files mounted with gvfsd-fuse.
proposed patch in xdg-desktop-portal-gnome that fixes this: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/67 |
To ensure the documented behaviour, ignore URIs without the file:// scheme. Closes: flatpak#213
To ensure the documented behaviour, ignore URIs without the file:// scheme. Closes: flatpak#213
To ensure the documented behaviour, ignore URIs without the file:// scheme. Closes: flatpak#213
To ensure the documented behaviour, ignore URIs without the file:// scheme. Closes: #213
This has been pushed into a documentation change. Backends are responsible for returning only |
Thanks! |
Several people complain that they can't save files in remote drives (like a SMB mount) from containerized applications (like Firefox). After doing several tests, I found that it worked fine when using xdg-desktop-portal-gtk, but not when using xdg-desktop-portal-gnome. The reason seems to be that xdg-desktop-portal-gtk translates the smb:// URIs (and other remote URIs like sftp://) into locally accessible file:// URIs (thanks to the FUSE backends available with Gvfs), but xdg-desktop-portal-gnome doesn't do that. This patch fixes this by checking each URI obtained from the GtkFileChooser dialog, and if it isn't a "file://" one, it tries to translate it into its FUSE local URI. Also ensure that a trash:/// or a recent:/// URI is transformed into a local one. Fix https://bugzilla.mozilla.org/show_bug.cgi?id=1773624 Fix flatpak/xdg-desktop-portal#213 Fix flatpak/xdg-desktop-portal#820
Several people complain that they can't save files in remote drives (like a SMB mount) from containerized applications (like Firefox). After doing several tests, I found that it worked fine when using xdg-desktop-portal-gtk, but not when using xdg-desktop-portal-gnome. The reason seems to be that xdg-desktop-portal-gtk translates the smb:// URIs (and other remote URIs like sftp://) into locally accessible file:// URIs (thanks to the FUSE backends available with Gvfs), but xdg-desktop-portal-gnome doesn't do that. This patch fixes this by checking each URI obtained from the GtkFileChooser dialog, and if it isn't a "file://" one, it tries to translate it into its FUSE local URI. Also ensure that a trash:/// or a recent:/// URI is transformed into a local one. Fix https://bugzilla.mozilla.org/show_bug.cgi?id=1773624 Fix flatpak/xdg-desktop-portal#213 Fix flatpak/xdg-desktop-portal#820 (cherry picked from commit 8acf01a)
So far, we've used GIO_USE_VFS=local to guarantee this, but we do want to let the user access gvfs. That means that we need to translate non-file uris to their local (fuse) equivalents, since we can't rely on things like trash: or recent: to work inside the sandbox.
The text was updated successfully, but these errors were encountered: