Comment 2 for bug 1958670

Revision history for this message
James Carroll (james-carroll) wrote : Re: Save as window does not save file is file extension is missing

This is a horrifying problem, and what's worse, is I doubt this is a problem exclusive to Pinta.

To briefly explain what's happening, the Snap (and Flatpak) use XDG Desktop Portals for the file open and save dialogs. When Pinta is saving the file without the extension, from it's perspective it's absolutely functioning fine. The file is saved in /run/user/$UID/docs/by-app/snap.pinta/picture.jpg

You might be able to access that folder and recover some data, but unfortunately, the /run folder is deleted on every reboot.

What's supposed to happen, is that the system should link the file from /run and make it available where the user actually requested to save it, in the symlink sort of sense (though not actually using symlinks, it basically means the file would appear to exist in both locations and changes to one file are instantly reflected in both locations).

For whatever reason, this isn't happening when the file extension isn't manually appended.

This will certainly be a Linux specific issue, the Windows and Mac builds won't have anything to be concerned with.

I've forwarded this on in the Snapcraft forums, because I can't determine whether this is a problem with the the upstream sources or the specific Ubuntu build, but either way Ubuntu would have to make a patch for this to fix it for everybody involved, so IMO it's ideal to start there and see how it follows on.

In the meantime, it's entirely within my power to disable the use of the portals for the Pinta snap, but as I've said, this issue is almost certainly more widespread than just Pinta alone.

Thank you very much for bringing it up here, hopefully this will be resolved promptly.