! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Incorrect mime handling when one extension designates multiple mimetype
Status:
RESOLVED: WONTFIX
Product:
Thunar-vfs
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2009-11-22 10:44:47 CET
Hey,

it seems that the MIME handling in Thunar (1.0.1) might have problems when there are multiple mime types designated by only one extension. Basically it seems to take the latest one present in /usr/share/mime/globs which might usually be ok but breaks in some cases (like in debian bug #547623)

Problems seems to be located at thunar-vfs-mime-legacy.c:660

Not sure how gio behaves so it might be worth waiting for the transition, but it'd still be nice to fix to have it fixed in 1.0

Cheers,
--
Yves-Alexis
Comment 1 Yves-Alexis Perez editbugs 2010-04-22 22:49:53 CEST
Hmhh, any news on this? :) (I know you're short on time, it's just a friendly ping :p)
Comment 2 David Faure 2010-07-19 13:05:17 CEST
gio and kio do it by following the shared-mime-info spec ;)
It says, under "Recommended checking order" :

If the glob matching fails or results in multiple conflicting mimetypes, read the contents of the file and do magic sniffing on it. If no magic rule matches the data (or if the content is not available), use the default type of application/octet-stream for binary data, or text/plain for textual data. If there was no glob match, use the magic match as the result.

If any of the mimetypes resulting from a glob match is equal to or a subclass of the result from the magic sniffing, use this as the result. This allows us for example to distinguish text files called "foo.doc" from MS-Word files with the same name, as the magic match for the MS-Word file would be application/x-ole-storage which the MS-Word type inherits.

http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.18.html
Comment 3 Nick Schermer editbugs 2014-12-03 09:20:10 CET
Close bug reports of archived products.

Bug #6015

Reported by:
Yves-Alexis Perez
Reported on: 2009-11-22
Last modified on: 2014-12-03

People

Assignee:
Jannis Pohlmann
CC List:
4 users

Version

Version:
unspecified

Attachments

Additional information