[tracker/tracker-1.12] libtracker-miner: Fix warnings if move ops happened during initial crawling
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.12] libtracker-miner: Fix warnings if move ops happened during initial crawling
- Date: Fri, 29 Sep 2017 17:11:54 +0000 (UTC)
commit f1bb2e439a456feab3111a971bfd9e7692da662b
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jul 6 11:19:17 2017 +0200
libtracker-miner: Fix warnings if move ops happened during initial crawling
The checks to notify about indexing having finished on TrackerIndexingTree
roots were mistaking ItemMovedData* with GFile*, which lead to warnings.
This should be harmless, the signal might be possibly emitted before the
move op is dispatched, that's all.
src/libtracker-miner/tracker-miner-fs.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index b71e82b..e3b7c12 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1110,6 +1110,15 @@ miner_resumed (TrackerMiner *miner)
}
}
+static gboolean
+item_moved_data_has_prefix (gpointer data,
+ gpointer user_data)
+{
+ ItemMovedData *moved_item = data;
+ GFile *prefix = user_data;
+
+ return g_file_has_prefix (moved_item->file, prefix);
+}
static void
miner_ignore_next_update (TrackerMiner *miner, const GStrv urls)
@@ -1165,7 +1174,7 @@ notify_roots_finished (TrackerMinerFS *fs,
(tracker_priority_queue_find (fs->priv->items_created, NULL, (GEqualFunc)
g_file_has_prefix, root) ||
tracker_priority_queue_find (fs->priv->items_updated, NULL, (GEqualFunc)
g_file_has_prefix, root) ||
tracker_priority_queue_find (fs->priv->items_deleted, NULL, (GEqualFunc)
g_file_has_prefix, root) ||
- tracker_priority_queue_find (fs->priv->items_moved, NULL, (GEqualFunc)
g_file_has_prefix, root) ||
+ tracker_priority_queue_find (fs->priv->items_moved, NULL, (GEqualFunc)
item_moved_data_has_prefix, root) ||
tracker_priority_queue_find (fs->priv->items_writeback, NULL, (GEqualFunc)
g_file_has_prefix, root))) {
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]