summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-07-05 21:54:29 +0200
committerMartyn Russell <martyn@lanedo.com>2015-07-31 15:58:02 +0100
commit43663b937f9f29ca444733e933b31386deb1be6e (patch)
tree8469874bb583ba0e1db90a7e49dece98706f489b
parent7b225569d021b0fd1143b30a0a1ad3f63a5cca97 (diff)
downloadtracker-43663b937f9f29ca444733e933b31386deb1be6e.tar.gz
tracker-miner-fs: Reset retry counter when we need to prepend parents
The situation where a parent directory has to be prepended in order to process the current file is rare, mainly reserved to IndexFile calls on files out of watched dirs. This is a corner situation, but it is a legit place where we have to put the file back again in the queue, and thus we shouldn't increase the retry counter. This nominally fixes the indexing of gnome-documents-getting-started.pdf on a fresh-out tracker DB, as requested by gnome-shell. https://bugzilla.gnome.org/show_bug.cgi?id=751992
-rw-r--r--src/libtracker-miner/tracker-miner-fs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 435c0b607..8ea345edd 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2061,6 +2061,14 @@ should_wait (TrackerMinerFS *fs,
return FALSE;
}
+static void
+item_reset_reentry_counter (TrackerMinerFS *fs,
+ GFile *file)
+{
+ g_object_set_qdata (G_OBJECT (file),
+ fs->priv->quark_reentry_counter, NULL);
+}
+
static gboolean
item_reenqueue_full (TrackerMinerFS *fs,
TrackerPriorityQueue *item_queue,
@@ -2568,6 +2576,8 @@ item_queue_handlers_cb (gpointer user_data)
item_queue = fs->priv->items_updated;
}
+ item_reset_reentry_counter (fs, file);
+
/* Parent isn't indexed yet, reinsert the task into the queue,
* but forcily prepended by its parent so its indexing is
* ensured, tasks are inserted at a higher priority so they