From f0a3ae7ec91ee8d652c904e9aa9a30313f627484 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 24 Oct 2017 22:32:23 +0200 Subject: libtracker-miner: Avoid interning file for monitoring purposes It doesn't bring any gains to use interned files when adding directories to the TrackerMonitor. Just use the GFile we get and avoid interning the directory this soon. --- src/libtracker-miner/tracker-file-notifier.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c index 1dbbb199a..1b3028cd1 100644 --- a/src/libtracker-miner/tracker-file-notifier.c +++ b/src/libtracker-miner/tracker-file-notifier.c @@ -245,22 +245,17 @@ crawler_check_directory_contents_cb (TrackerCrawler *crawler, parent, children); if (process) { TrackerDirectoryFlags parent_flags; - GFile *canonical; gboolean add_monitor; - canonical = tracker_file_system_get_file (priv->file_system, - parent, - G_FILE_TYPE_DIRECTORY, - NULL); tracker_indexing_tree_get_root (priv->indexing_tree, - canonical, &parent_flags); + parent, &parent_flags); add_monitor = (parent_flags & TRACKER_DIRECTORY_FLAG_MONITOR) != 0; if (add_monitor) { - tracker_monitor_add (priv->monitor, canonical); + tracker_monitor_add (priv->monitor, parent); } else { - tracker_monitor_remove (priv->monitor, canonical); + tracker_monitor_remove (priv->monitor, parent); } } else { priv->current_index_root->current_dir_content_filtered = TRUE; -- cgit v1.2.1