summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-10-08 12:02:19 +0200
committerAlexander Larsson <alexl@redhat.com>2009-10-08 12:02:19 +0200
commit755fb0b6698af8a8a3b9c633572561ccce0f5402 (patch)
tree7f54e72eac6b5c33fdb2dc6847cc7cd728b7a269
parent1b94afe43fa2e6236caf0c02af056de6b1877345 (diff)
sort glob hits with larger weight first
Higher weight is more important, so return these first meaning they will be used as the default.
-rw-r--r--src/xdgmimecache.c2
-rw-r--r--src/xdgmimeglob.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/xdgmimecache.c b/src/xdgmimecache.c
index bdb19da..1e99b3e 100644
--- a/src/xdgmimecache.c
+++ b/src/xdgmimecache.c
@@ -565,7 +565,7 @@ static int compare_mime_weight (const void *a, const void *b)
const MimeWeight *aa = (const MimeWeight *)a;
const MimeWeight *bb = (const MimeWeight *)b;
- return aa->weight - bb->weight;
+ return bb->weight - aa->weight;
}
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
diff --git a/src/xdgmimeglob.c b/src/xdgmimeglob.c
index 54e3dc0..f8434bc 100644
--- a/src/xdgmimeglob.c
+++ b/src/xdgmimeglob.c
@@ -381,7 +381,7 @@ static int compare_mime_weight (const void *a, const void *b)
const MimeWeight *aa = (const MimeWeight *)a;
const MimeWeight *bb = (const MimeWeight *)b;
- return aa->weight - bb->weight;
+ return bb->weight - aa->weight;
}
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')