Drag and drop of files from Nautilus may result in inaccessible file from the Flatpak sandbox
When opening files from certain locations (I guess the ones blacklisted by flatpak from being exposed through --filesystem=host
as documented in https://docs.flatpak.org/en/latest/sandbox-permissions.html#filesystem-access) the file is opened correctly in some cases, but it is shown as empty also if actually isn't; in particular, the file contents are shown correctly if the file is opened through the open file dialog (Ctrl+O) or through "Open with" action from Nautilus context menu, but it appears empty if opened through drag-and-drop from a Nautilus window into a Text Editor window or if passed as a command-line argument (e.g., flatpak run org.gnome.TextEditor.Devel <filename>
).
In case it can be relevant, I noticed that when the file is opened correctly, the "subtitle" under the file name with the "path" reads "Document Portal", while when the file appears empty it shows the actual path (e.g., /tmp
).
How to reproduce: run echo "word" > /tmp/test.txt
in a shell and then open the file through drag-and-drop from Nautilus into a TextEditor window or with flatpak run org.gnome.TextEditor.Devel /tmp/test.txt
.
I guess this issue is related to #40 (closed) and to #143 (closed).