-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
FileChooser: Portal can only open, not just choose files #847
Comments
My take on this: the portal can only open files, since thats what it says on the label (literally, in the filechooser button): "Open". The fact that the backends currently let you select files or folders that the frontend then refuses to return to the caller feels like a quality-of-implementation issue in the affected backends. They should only let the user select objects that are acceptable. |
Files vs folders, a classic UNIX tale… Given how disperate the implementations are it would seem we still have a documentation issue, or alternatively this is a feature request. Also Matthias Clasen's downstream comment seems to imply this should work with folders:
And if I understand correctly, the main issue seems to be that implementations don't know (or don't tell apps?) when that adding-to-document-store failed? Though it's possible I'm not following. |
And another day on which, someone got bitten by the problem because we dropped the most basic features from our ecosystem. https://gitlab.gnome.org/World/pika-backup/-/issues/138#note_1600670 |
Trying to clarify the purpose of this portal: the file chooser portal is about taking files (or folders) that are available (ie redable) by the user, and making them available (ie readable) for the caller. Therefore, it can by definition only return readable files/folders, and it cannot operate on files/folders that are not readable by the user. |
Not sure where that definition comes from but never mind. I made some suggestions on how to cover the use cases that are currently not possible via portals. What are your alternative suggestions? |
To me it seems like the only case where getting a reference to some path which can't be opened is desired is when the app has access to the host filesystem. Could we maybe add a flag to the filechooser which can only be used when the app host access to the host fs where the filechooser returns a host path instead of adding it to the document store? |
Another thought... if the app already has access to the host filesystem, shouldn't it be possible to use the gtk filechooser instead to select files even if the can't be opened? |
In my experience, granting
Please don't. I |
That's totally possible, and that's what most people have suggested. But it has been rejected so far. That's why I'm asking the maintainers to suggest an alternative solution. |
This issue is basically an upstreaming of https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/26
Currently, OpenFile() is designed to make files/folders available as readable in the sandbox. Following problems exist with the current design/definition
I see two things that probably should happen:
The text was updated successfully, but these errors were encountered: