summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-06-22 13:15:57 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-06-29 20:49:07 +0200
commita9ea0bc93630008c62ee1360487900642d625e86 (patch)
treee705b158f2220f438f419e9319366c2426b0a75e
parentce0c87c0a34a608937b6a2637d9fc95258a937d0 (diff)
downloadtracker-a9ea0bc93630008c62ee1360487900642d625e86.tar.gz
libtracker-control: Skip miners not meant to be loaded.
This will make the miners not specified in the domain ontology description file invisible from the API user perspective.
-rw-r--r--src/libtracker-control/tracker-miner-manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libtracker-control/tracker-miner-manager.c b/src/libtracker-control/tracker-miner-manager.c
index aaee3d052..d58898529 100644
--- a/src/libtracker-control/tracker-miner-manager.c
+++ b/src/libtracker-control/tracker-miner-manager.c
@@ -754,6 +754,15 @@ check_file (GFile *file,
return;
}
+ if (!tracker_domain_ontology_uses_miner (priv->domain_ontology, name_suffix)) {
+ /* Silently ignore, this domain ontology is not meant to use this miner */
+ g_key_file_free (key_file);
+ g_free (dbus_path);
+ g_free (display_name);
+ g_free (name_suffix);
+ return;
+ }
+
description = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, DESCRIPTION_KEY, NULL, NULL);
data = g_slice_new0 (MinerData);