aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Cox2013-10-07 07:11:09 (EDT)
committerGerrit Code Review @ Eclipse.org2013-10-10 08:47:07 (EDT)
commit68e82eff6910deb2bf408cc4927ac6e52e367ee1 (patch)
tree8b6255d6545a8693017ec4e347fd8db4b7a988aa
parent3d7660d12b57efbf49e0dce8bf932fcbbf327686 (diff)
downloadeclipse.platform.swt-68e82eff6910deb2bf408cc4927ac6e52e367ee1.zip
eclipse.platform.swt-68e82eff6910deb2bf408cc4927ac6e52e367ee1.tar.gz
eclipse.platform.swt-68e82eff6910deb2bf408cc4927ac6e52e367ee1.tar.bz2
Bug 410904 - preserve order of MIME globsrefs/changes/96/17096/2
Program#gio_getMimeInfo() reverses the order of appearance of MIME associations in /usr/share/mime/globs, meaning that, where more than one MIME type shares an extension association, the last mention in globs is used first. https://developer.gnome.org/shared-mime-info-spec/#id2819911 says that globs should be in order of weight. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410904 Change-Id: I337764017263f74862435048c46a57653022c313 Signed-off-by: Ben Cox <benjamin.cox@uk.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 2c30223..964eebd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -707,7 +707,6 @@ static Hashtable gio_getMimeInfo() {
int extensionIndex = extensionFormat.indexOf (".");
if (extensionIndex > 0) {
String extension = extensionFormat.substring (extensionIndex);
- mimeTypes.add (mimeType);
if (mimeTable.containsKey (extension)) {
/*
* If mimeType already exists, it is required to update
@@ -716,6 +715,7 @@ static Hashtable gio_getMimeInfo() {
Vector value = (Vector) mimeTable.get (extension);
mimeTypes.addAll (value);
}
+ mimeTypes.add (mimeType);
mimeTable.put (extension, mimeTypes);
}
}