Commit 713018bf authored by Carlos Garnacho's avatar Carlos Garnacho

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.
parent f2183ef2
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment