-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Handle directories in the OpenFile method #128
Comments
Ready for review at #130 @matthiasclasen @alexlarsson Please let me know what you think, and merge if needed. Thanks! |
@mariospr So does this mean EDIT: I guess from reading that conversation that directories still won't work w/o permissions to them. |
I don't think so, this is used for now only from the email and openURI portals, don't think would make a difference to GTK+'s implementation of the file chooser inside the sandbox
Correct |
I just wanted to mention that I could use this for org.openclonk.OpenClonk (which is a game, and as such gets sandboxed, but comes with an scenario editor, that needs access to project folders). |
As mentioned on IRC today, I found that the
OpenFile
method won't handle FDs pointing to directories even in the case where such directories are reachable both inside and outside the sandbox, which is kind of a problem for situation like one we have on Endless, where the Dropbox app (which hasfilesystem=home
permissions granted) tries to open the file manager in the "Dropbox directory".I've discussed this with @alexlarsson and he seems to agree on that we can add an additional check in https://github.com/flatpak/xdg-desktop-portal/blob/master/src/xdp-utils.c#L340, so that fail when the FD passed points to something that is neither a regular file nor a directory (instead of checking just for regular files).
This, of course, won't be useful in cases where such directory is not reachable inside the sandbox, since those kind of paths would need to be handled via the documents portal, and FUSE does not support directories, but it can be useful nonetheless in cases like the mentioned here.
I'll be linking to a PR soon later today.
Now see the full IRC log, for reference:
The text was updated successfully, but these errors were encountered: