34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From 450fea253095c7dd8a6293af8f86ea9b81ad46b2 Mon Sep 17 00:00:00 2001
|
|
From: Ryan Lortie <desrt@desrt.ca>
|
|
Date: Thu, 4 Sep 2014 13:17:27 -0400
|
|
Subject: [PATCH] GDesktopAppInfo: fix default app logic
|
|
|
|
We use "tweaks" structures to track how a particular directory impacts
|
|
the list of added, removed and default applications. We maintain this
|
|
set of tweaks for each directory, in a hash table, keyed by unaliased
|
|
mime type name, in order to facilitate fast lookups.
|
|
|
|
A typo in the logic for creating and maintaining the uniqueness of these
|
|
structures was causing the default app to be selected incorrectly from
|
|
time to time. Fix that.
|
|
---
|
|
gio/gdesktopappinfo.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
|
|
index 1d38d4a..ddec690 100644
|
|
--- a/gio/gdesktopappinfo.c
|
|
+++ b/gio/gdesktopappinfo.c
|
|
@@ -641,7 +641,7 @@ desktop_file_dir_unindexed_get_tweaks (DesktopFileDir *dir,
|
|
gchar *unaliased_type;
|
|
|
|
unaliased_type = _g_unix_content_type_unalias (mime_type);
|
|
- tweaks = g_hash_table_lookup (dir->mime_tweaks, mime_type);
|
|
+ tweaks = g_hash_table_lookup (dir->mime_tweaks, unaliased_type);
|
|
|
|
if (tweaks == NULL)
|
|
{
|
|
--
|
|
1.9.3
|
|
|