From 78b6dc7dbf865df6b0d30526293591fe5773029a Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 6 Dec 2011 09:49:49 +0000 Subject: [PATCH] If /usr/share/color appears at runtime, don't rescan the parent dir Resolves https://bugs.freedesktop.org/show_bug.cgi?id=43542 --- src/cd-profile-store.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cd-profile-store.c b/src/cd-profile-store.c index ecad474..c662351 100644 --- a/src/cd-profile-store.c +++ b/src/cd-profile-store.c @@ -260,8 +260,14 @@ cd_profile_store_file_monitor_changed_cb (GFileMonitor *monitor, /* just rescan the correct directory */ parent = g_file_get_parent (file); parent_path = g_file_get_path (parent); - g_debug ("CdProfileStore: %s was added, rescanning %s", path, parent_path); - cd_profile_store_search_path (profile_store, parent_path); + if (g_strcmp0 (parent_path, DATADIR) == 0) { + g_debug ("CdProfileStore: %s was added, rescanning", path); + cd_profile_store_search_path (profile_store, path); + } else { + g_debug ("CdProfileStore: %s was added, rescanning parent %s", + path, parent_path); + cd_profile_store_search_path (profile_store, parent_path); + } out: if (parent != NULL) g_object_unref (parent); -- 1.7.6