[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 102/115] libtracker-miner: Fix thinko in condition



commit 5c5c40d75a3e0071a21ffa9edeb0dabc4ee1aa50
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 4 12:09:31 2019 +0100

    libtracker-miner: Fix thinko in condition
    
    use_changed_event refers to FAM and the inability of the GIO monitor
    implementation to send CHANGES_DONE_HINT for it. This means we have
    to forward CREATED/CHANGED events immediately if we have to rely on
    FAM-backed monitors.
    
    However the condition handling this was inverted, which meant we
    sucked with file monitors that honored CHANGES_DONE_HINT, and
    completely broke updates on FAM monitors.
    
    Closes: https://gitlab.gnome.org/GNOME/tracker-miners/issues/36

 src/libtracker-miner/tracker-monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index f292fa5e7..2fe1dfb3e 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -694,7 +694,7 @@ monitor_event_cb (GFileMonitor      *file_monitor,
        switch (event_type) {
        case G_FILE_MONITOR_EVENT_CREATED:
        case G_FILE_MONITOR_EVENT_CHANGED:
-               if (priv->use_changed_event) {
+               if (!priv->use_changed_event) {
                        cache_event (monitor, file, event_type);
                } else {
                        emit_signal_for_event (monitor, event_type,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]