3 ms·
OS X managed to solve this using the standard file browser API grants access to the file. That’s a little more challenging on Linux though perhaps not impossibl
by lathiat 6y ago
OS X managed to solve this using the standard file browser API grants access to the file. That’s a little more challenging on Linux though perhaps not impossible.
- dylan-m 6y agoThat's exactly how it works in Flatpak, and you get it for free if you use GTK's FileChooserNative dialog: https://developer.gnome.org/gtk3/stable/gtk3-GtkFileChooserNative.html https://developer.gnome.org/gtk3/stable/gtk3-GtkFileChooserN... If your application is inside a sandbox, it communicates with another process that presents the file chooser and hands over permissions based on the user's selection. It is possible to choose directories in the same way, and portals are always improving: https://github.com/flatpak/xdg-desktop-portal https://github.com/flatpak/xdg-desktop-portal. Plenty of Flatpak applications actually do use this, but the author of this website loves to pick out the ones that don't so he can act like the project is flawed to the core and justify his sensationalist domain name. But actually it is very solvable, it is being solved, and in many cases you can tighten an application's sandbox with a two line diff.