There’s been a bug report about data loss when using the XDG portals on one of the snaps I package. Because of the nature of the bug, it seems it likely effects far more people than myself, and I thought I’d come here to see if anyone could offer any guidance on how to proceed.
To cover the basics, this is running on an Ubuntu 20.04.3 machine, the snap involved is
pinta (though I imagine it wouldn’t matter). Everything is updated. There’s no other PPA’s or third party repo’s involved on this system.
In principal, when saving a file; if the file has no file extension the data is simply lost. That’s not quite specifically what happens, but this is the user experience.
Imagine drawing a picture, and saving the file with a name like
test. The save completes, and the GUI will actually show the file saved as
test.jpg. Running the command
flatpak permissions will even show that the documents portal has been used in this case, and there should be a link between
/run/user/$UID/docs and wherever the user actually saved.
But it isn’t the case, the data exists in
/run, but isn’t copied across to where the user saves. The data will be lost when the user restarts the application or reboots (as
/run is cleared on reboot!).
Simply adding a file extension is enough to prevent this, similarly, removing the use of the XDG portals also fixes this.
So why am I asking here? Well, I’m unsure where to proceed. It’s a bug that probably effects significantly more users than just myself, because it’s part of the portal code that’s outside the snaps domain. I can’t verify if it’s a problem with upstream because I wouldn’t trust my ability to build it. I can’t run other distributions on this system because of limitations with my virtual machine software, and so I’m essentially left with report this on the Portals github and report it here; I will report it on the Github shortly if there’s no immediate responses, but I’m familiar with the people here and given this may be an Ubuntu specific problem to boot, there might be more knowledge here.
Can anyone chime in on where to proceed from here?