After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788228 - can't access to others HDD partition
can't access to others HDD partition
Status: RESOLVED OBSOLETE
Product: gnome-games
Classification: Core
Component: general
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
: 788341 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-27 09:37 UTC by alban.petiot
Modified: 2018-09-01 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ui: Fix accessing files outside the sandbox (977 bytes, patch)
2017-11-17 11:09 UTC, Bastien Nocera
committed Details | Review

Description alban.petiot 2017-09-27 09:37:14 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)
Comment 1 Adrien Plazas 2017-09-27 10:24:30 UTC
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…
Comment 2 alban.petiot 2017-09-27 19:03:29 UTC
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
Comment 3 Bastien Nocera 2017-10-04 12:18:54 UTC
*** Bug 788341 has been marked as a duplicate of this bug. ***
Comment 4 Bastien Nocera 2017-10-04 12:20:45 UTC
(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.
Comment 5 Adam Plumb 2017-11-17 01:11:08 UTC
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.
Comment 6 Bastien Nocera 2017-11-17 11:09:56 UTC
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.
Comment 7 Adrien Plazas 2017-11-17 11:54:16 UTC
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!
Comment 8 Adrien Plazas 2017-11-17 11:55:44 UTC
Attachment 363912 [details] pushed as 0184a5d - ui: Fix accessing files outside the sandbox
Comment 9 Adrien Plazas 2017-11-17 12:04:59 UTC
Turns out I can see games out of the sandbox _but_ when adding themhey don't appear in the collection. Reopening.
Comment 10 Alexander Mikhaylenko 2018-08-17 14:25:59 UTC
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.