[Bug 25166] Multiple mime type handling registered for different file extensions

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Nov 17 22:49:22 CST 2010


--- Comment #10 from Damjan Jovanovic <damjan.jov at gmail.com> 2010-11-17 22:49:20 CST ---
Ok I found a reproducible test case. Install IrfanView and associate it with
all file types for all users, then right-click a JPEG file -> 3 "Irfanview"

The MIME hierarchy is:

image/jpeg <-----> image/pjpeg

so there's no ambiguity there.

But the files in ~/.local/share/applications do this:

$ grep image/jpeg * -i

grep IrfanView.JPG *
wine-extension-jpe.desktop:Exec=wine start /ProgIDOpen IrfanView.JPG %f
wine-extension-jpeg.desktop:Exec=wine start /ProgIDOpen IrfanView.JPG %f
wine-extension-jpg.desktop:Exec=wine start /ProgIDOpen IrfanView.JPG %f

Windows works by file extension and a file has exactly 1 extension, so only a
single application can be started. Freedesktop works by MIME type, multiple
extensions can get mapped onto the same MIME type, and then all applications
for those extensions will be listed, leading to potential duplication.

Sometimes we generate a MIME type and sometimes we adopt one from Freedesktop.
When we generate, the MIME type is unique to the extension and duplication is
impossible. When we adopt, like we did here, multiple extensions can adopt the
same one which is desirable, but multiple instances of the same application can
also adopt one which is undesirable. In other words we should map Freedesktop
MIME type->Wine application not Freedesktop MIME type->Wine extension.

This leads to potential ambiguity. Out of multiple extensions on Wine's side
for an application, which one wins? Presumably the extension specified by
Freedesktop is the best one, but (1) Freedesktop can specify multiple
extensions, and (2) Wine's extensions might all differ from Freedesktop's.

I'll give this some thought.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list