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
This commit is contained in:
Ryan Lortie 2015-03-26 14:49:26 -04:00
parent 706c4d32ad
commit fd40b5942d

View File

@ -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);