Comment 11 for bug 1958670

Revision history for this message
James Carroll (james-carroll) wrote (last edit ):

I built Pinta outside the Snap environment, though in this case it seems to work identically to inside the Snap environment (both with and without the portal even). If there is no extension, then it won't appear with the image filter as you expect. What's even weirder however, is that it won't appear even if the filter is disabled (I.E, set to all files).

This doesn't seem to be the case with other apps, they can correctly identify an extensionless file as a valid image, and if their filters are set to images only, they still find results without the extension. (I tested GTK2 based Gimp, LibreOffice, and a few other ones).

I know that the logic for identifying files can be based on not just file extension, but also by inspecting the file header, but I can't figure out where on Ubuntu the magic headers are kept. Presumably though, this is how the native system knows to still open these files properly; and Pinta should be able to benefit from that logic too but doesn't seem to be doing so.

So as is, yes, not having an extension would result in the poor UX you're describing where it wouldn't be visible in the file picker. But it might be that the filepicker is applying too many filters to begin with, because my experience with other applications suggests it totally should be capable of finding extensionless image files.

(All this said, my personal opinion is is that files should have the extensions regardless, because checking the headers is slower than the file extension approach, and it's much easier to do command line manipulations when files are properly tagged)