[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 87/116] libtracker-miner: Silence PREUNMOUNT/UNMOUNTED events



commit b42b1fb0cb301e090853fdc108e2792390a73fab
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Nov 11 16:08:20 2018 +0100

    libtracker-miner: Silence PREUNMOUNT/UNMOUNTED events
    
    Those may happen in certain circumstances on monitored dirs, but are safe
    to simply ignore. This leaves the warning for EVENT_MOVED which can only
    be a bug in GLib since we use G_FILE_MONITOR_WATCH_MOVES.
    
    Closes: https://gitlab.gnome.org/GNOME/tracker/issues/54

 src/libtracker-miner/tracker-monitor.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index 51876c086..6272ac1b0 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -768,11 +768,12 @@ monitor_event_cb (GFileMonitor      *file_monitor,
                                       G_FILE_MONITOR_EVENT_MOVED,
                                       is_directory, file, other_file);
                break;
-       case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
-       case G_FILE_MONITOR_EVENT_UNMOUNTED:
        case G_FILE_MONITOR_EVENT_MOVED:
                g_warn_if_reached ();
                break;
+       case G_FILE_MONITOR_EVENT_PRE_UNMOUNT:
+       case G_FILE_MONITOR_EVENT_UNMOUNTED:
+               break;
        }
 
        g_free (file_uri);


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