http://bugs.winehq.org/show_bug.cgi?id=28159
Summary: [integration] winebrowser associations with *.htm and *.xml may cause native system to infinite loop Product: Wine Version: 1.3.26 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: wine@rodrigosilva.com
Out of the box, wine comes with *.htm and *.xml associations for winebrowser. And wine publishes those associations in native system, creating wine-extension-htm.desktop and wine-extension-xml.desktop. Those 2 appear in all native's "Open With" dialoags as legit options. But, if chosen, system enters an infinite loop (*.htm file -> start.exe /ProgId htmfile -> winebrowser -> xdg-open -> start.exe ...)
To prevent this, and still keep a way to allow wine apps to launch files in native apps AND allow native apps to launch files in wine apps, wine should implement a way to inhibit winemenubuilder to create native associations for certain extensions (in this case, *.htm and *.xml)
That can be done in several ways (hardcode blacklisting winebrowser.exe is the easiest, but its lame), and my suggestion is this:
winemenubuilder should not create associations if the class is in "WineImportedExtension.xxx" format. Example:
[HKEY_CLASSES_ROOT.htm] @="WineImportedExtension.htm"
[HKEY_CLASSES_ROOT\WineImportedExtension.htm\shell\open\command] @="C:\windows\system32\winebrowser-gui.exe "%1""
WineImportedExtension is a way to say: "this is not an extension handled by a windows app. It is an extension imported from native system. So DO NOT create an association for it in native... its already there"
To original class, "htmlfile", can stay untouched.
If, later, user installs a windows app that handles that extension, it will overwrite the default "WineImportedExtension.xxx" to its own, and winemenubuilder will correctly create a native *.htm association to indicate that now there is a windows app to actually handle that.