summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-10-24 22:32:23 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-10-24 22:32:23 +0200
commitf0a3ae7ec91ee8d652c904e9aa9a30313f627484 (patch)
tree7e9d48edefd9241783a73b5143d15c870f886e28
parent549f95f7533900f4ce417f2e0e213bfc0a242025 (diff)
downloadtracker-f0a3ae7ec91ee8d652c904e9aa9a30313f627484.tar.gz
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.
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c11
1 files 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;