xdgmime: sort glob hits with larger weight first

Higher weight is more important, so return these first meaning
they will be used as the default.
This commit is contained in:
Alexander Larsson 2009-10-08 11:59:23 +02:00
parent d9b87676fa
commit 2a3710872f
2 changed files with 2 additions and 2 deletions

View File

@ -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')

View File

@ -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')