Comment 12 for bug 355005

Revision history for this message
In , Scott Ritchie (scottritchie) wrote :

Created an attachment (id=20846)
Reduce .desktop file to application/x-msdos-executable and application/x-msi

Our desktop file is too greedy. I think I wrote it a while back off a list of every possible mime type a .exe file can have from somewhere on the internet; this resulted in entries like x-zip-compressed and x-executable. This results in the side effect that Wine now tries to open shell scripts and zip files on many systems.

On modern systems we can rely on shared-mime-info to correctly identify executables as application/x-msdos-executable, so we only need that MIME type for .exe.

So, I suggest we reduce our .desktop file to two mime types: application/x-msdos-executable and application/x-msi. The attached patch fixes this.

This still leaves the possibility of not opening .com, .bat, or similar files, however that's already broken and is a bug in shared-mime-info to be fixed there. Moreover, there's a slight chance of the reverse possibility - a .exe file that isn't a Wine executable file. I don't think that's our bug either though - again a problem in shared-mime-info.