winemenubuilder: associate .lnk files with wine.
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 4dc08d5..9f10fdb 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -1994,6 +1994,14 @@
return FALSE;
}
+static const char* get_special_mime_type(LPCWSTR extension)
+{
+ static const WCHAR lnkW[] = {'.','l','n','k',0};
+ if (!strcmpiW(extension, lnkW))
+ return "application/x-ms-shortcut";
+ return NULL;
+}
+
static BOOL write_freedesktop_association_entry(const char *desktopPath, const char *dot_extension,
const char *friendlyAppName, const char *mimeType,
const char *progId)
@@ -2102,6 +2110,8 @@
{
if (contentTypeW != NULL && strchrW(contentTypeW, '/'))
mimeTypeA = wchars_to_utf8_chars(contentTypeW);
+ else if ((get_special_mime_type(extensionW)))
+ mimeTypeA = strdupA(get_special_mime_type(extensionW));
else
mimeTypeA = heap_printf("application/x-wine-extension-%s", &extensionA[1]);