Commit 919f3b9c authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Check directory updates before dropping mtime info

file_notifier_traverse_tree() has the side effect of deleting mtime data,
as it's presumably not needed anymore, except here. Check whether the
directory was updated before notifying of the files inside, so we can
thoroughly check for deleted content.
parent 65249834
......@@ -861,6 +861,7 @@ sparql_files_query_cb (GObject *object,
TrackerFileNotifierPrivate *priv;
TrackerFileNotifier *notifier;
TrackerSparqlCursor *cursor;
gboolean directory_modified;
GError *error = NULL;
GFile *directory;
guint flags;
......@@ -883,13 +884,15 @@ sparql_files_query_cb (GObject *object,
g_object_unref (cursor);
file_notifier_traverse_tree (notifier, data->max_depth);
directory = priv->current_index_root->current_dir;
flags = priv->current_index_root->flags;
directory_modified = file_notifier_is_directory_modified (notifier, directory);
file_notifier_traverse_tree (notifier, data->max_depth);
priv->current_index_root->current_dir_content_filtered ||
file_notifier_is_directory_modified (notifier, directory)) {
directory_modified) {
/* The directory has updated its mtime, this means something
* was either added or removed in the mean time. Crawling
* will always find all newly added files. But still, we
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