When Nautilus first views a directory, it shows mime types based on quick
filename matching, so my .deb (Debian packages) files have the correct MIME
type/icons. However, when I click on a file Nautilus will sniff, and the mime
type changes to application/x-archive.
This has broken my Nautilus .deb property pages :(
I've been poking at this, and think its actually a bug in xdgmimemagic.c.
Attaching a very rough patch which fixes this problem for me. Basically new
matchlets were being prepended to the list instead of being appended. This
results in a matchlet chain which starts with a high indent and drops, instead
of the other way around.
This then breaks when searching as the indent of the matchlet chain does not
start with 0.
Note that this also fixes the bug where ELF executables are sniffed as core dumps.
Created attachment 117 [details] [review]
Append instead of prepend new matchlets
Incredibly ugly, but it works and I have dinner to eat.
This really belongs to the xdgmime component. This is supposed to be fixed by
the patch in bug #264, but some quick test shows it is not :-/ As expected, I
screwed up the patch somehow ;)
I investigated a bit more, and my patch is actually working fine. The problem is
that application/x-archive and application/x-deb have the same priority, and
application/x-archive comes first in the xml file. Lowering
application/x-archive priority/raising application/x-deb priority nicely fixes
the problem (when my patch is applied to xdgmime).
Confirmed, I must lost my local change to push the priority to 60 at some point
in the past.
Created attachment 132 [details] [review]
lower application/x-archive priority
yep, it works for me. Thx :)
Alex just committed this, closing.