Commit f12117df authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Preserve first cached event

We cache both CREATED and CHANGED events here, if we get both while
waiting for the CHANGES_DONE_HINT, it makes things more consistent
to cache the first CREATED event.

This did not result in bugs as the miner reacts the same either way.
parent 8b882ccf
...@@ -637,6 +637,11 @@ cache_event (TrackerMonitor *monitor, ...@@ -637,6 +637,11 @@ cache_event (TrackerMonitor *monitor,
TrackerMonitorPrivate *priv; TrackerMonitorPrivate *priv;
priv = tracker_monitor_get_instance_private (monitor); priv = tracker_monitor_get_instance_private (monitor);
if (g_hash_table_lookup_extended (priv->cached_events, file,
NULL, NULL))
return;
g_hash_table_insert (priv->cached_events, g_hash_table_insert (priv->cached_events,
g_object_ref (file), g_object_ref (file),
GUINT_TO_POINTER (event_type)); GUINT_TO_POINTER (event_type));
......
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