Closed
Description
Describe the bug
When you open an app with the Flatpak version of the App, you see the portal-location of the file and not the actual file location.
Expected behavior
To fix this, you should take a closer look at the NativeFileChooserApi spec. There is a specific method to get the actual location and not the security-portal symlink.
https://docs.gtk.org/gtk4/class.FileChooserNative.html
Environment (please complete the following information):
- OS: Fedora Linux 35
- Install method: Flathub
Activity
GeopJr commentedon Mar 15, 2022
Thanks for raising this issue!
Could you point me at that method? I can't seem to find it.
The closest I could find is flatpak/xdg-desktop-portal#475, which mentions adding host filesystem permission as a workaround. I'd like to avoid it unless there's no other solution.
Eonfge commentedon Mar 16, 2022
That should not be necessary, and it's also undesirable: An application like yours that should help people secure their computer, should not rely on such a brute-force method.
By the sound of it, showing the full path seems to be impossible right now. I didn't know that, so perhaps it's best to put it on the to-do list. For now, as a 'triage' you can just not display the file-path inside a flatpak. Bit blunt, but it solves the confusion it otherwise creates.
GeopJr commentedon Mar 16, 2022
That sounds like the best solution at the moment. I'll add a runtime check just in case someone gives it host filesystem permission manually. Thanks!