[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 103/116] libtracker-miner: Preserve first cached event
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 103/116] libtracker-miner: Preserve first cached event
- Date: Sat, 14 Dec 2019 16:23:28 +0000 (UTC)
commit f810a20bb4c28f52e3b47f1af55855344763d533
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 4 13:17:03 2019 +0100
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.
src/libtracker-miner/tracker-monitor.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index 2fe1dfb3e..342caaaa6 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -637,6 +637,11 @@ cache_event (TrackerMonitor *monitor,
TrackerMonitorPrivate *priv;
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_object_ref (file),
GUINT_TO_POINTER (event_type));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]