[glib] inotify: fix move event matching accounting



commit fd40b5942dc94effbd424302ccc9390e64005d5f
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Mar 26 14:49:26 2015 -0400

    inotify: fix move event matching accounting
    
    The hash table stores the list of unmatched IN_MOVE_FROM events, but we
    were removing entries from it when popping IN_MOVE_TO events.
    
    Fix that up to correct a crash in nautilus due to the assertion failure
    below.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746749

 gio/inotify/inotify-kernel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/inotify/inotify-kernel.c b/gio/inotify/inotify-kernel.c
index ebdf383..89fb9ca 100644
--- a/gio/inotify/inotify-kernel.c
+++ b/gio/inotify/inotify-kernel.c
@@ -313,7 +313,7 @@ ik_source_dispatch (GSource     *source,
       /* callback will free the event */
       event = g_queue_pop_head (&iks->queue);
 
-      if (event->mask & IN_MOVED_TO && !event->pair)
+      if (event->mask & IN_MOVED_FROM && !event->pair)
         g_hash_table_remove (iks->unmatched_moves, GUINT_TO_POINTER (event->cookie));
 
       G_LOCK (inotify_lock);


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