GNOME Bugzilla – Bug 788228
can't access to others HDD partition
Last modified: 2018-09-01 10:54:05 UTC
I have a partition named "Data" that is mount on /mnt/Data. On that partition i have saved my games but i can't access to it in the "+" menu of the Games application. (I have access to it on the consol and on nautilus for read and write)
Are you using a Flaptak version? If yes then that's a limitation of Flatpak: it can only access your home directory. Maybe mounting the partition somewhere in you home would work…
I use Flatpak 0.8.5 but I have an access to "/" and most of the other directory in "/" but not to "/mnt/". I have try to mount a USB stick ont my home directory it's work. but the partition disk "data" is mounted at the machine start
*** Bug 788341 has been marked as a duplicate of this bug. ***
(In reply to Adrien Plazas from comment #1) > Are you using a Flaptak version? If yes then that's a limitation of Flatpak: > it can only access your home directory. Maybe mounting the partition > somewhere in you home would work… It's not. You're not using the correct interface to access files outside the sandbox. Here: https://git.gnome.org//browse/gnome-games/tree/src/ui/application.vala#n135 you need to use GtkFileChooserNative, which will call out to portals when inside Flatpak containers. It's probably a one-line change in this case.
I'd like to +1 that this is an issue for me as well on Fedora where the flatpak version is the only one readily available. I store my game files on a separate hard drive that is not mounted in my home folder. I can confirm that mounting it in my home folder is a valid workaround, but it would be better to just allow finding files from anywhere my user has access to, and less hostile towards users.
Created attachment 363912 [details] [review] ui: Fix accessing files outside the sandbox Use a filechooser that can break out of the sandbox to go and look for games to add to the library.
Review of attachment 363912 [details] [review]: The type is GtkFileChooserNative, and its API if a bit different from GtkFileChooserDialog. I'll just fix and accept the patch, thanks!
Attachment 363912 [details] pushed as 0184a5d - ui: Fix accessing files outside the sandbox
Turns out I can see games out of the sandbox _but_ when adding themhey don't appear in the collection. Reopening.
It works fine in development versions. The file chooser is problematic anyway, because it won't work when a game depends on other files in the same directory, like for bin+cue images, games that have multiple disks, and DOS games that consist of multiple files in most cases, but that's a separate problem, which I've just opened https://gitlab.gnome.org/GNOME/gnome-games/issues/96 for.