From 764958a19ac8c83d0399455b0657f0c1d480f396 Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Mon, 14 Dec 2015 19:11:17 +0100 Subject: directory-async: set NULL the count progress on cancel When a file gets moved, nautilus directory cancel the loading of the attributes of that file, in case that file is in the work queue of that directory, since it will move to another directory. For that, we cancel the cancellable associated to the async request of the attributes of that file. However, since this is threaded, if some client of the directory kick of I/O with the nautilus_directory_async_state_changed and the cancellable didn't reach the callback, the file attributes are still going on, and we reach an assert when trying to stop them again, since the file requesting for those attributes is no longer the one we want to stop loading. This was causing problems when the race kicks in, for example, the move to context menu action. To fix it, apart of cancel the cancellable associated, set the directory private data files as null, to avoid trying to stop the already stopped request. https://bugzilla.gnome.org/show_bug.cgi?id=756253 --- libnautilus-private/nautilus-directory-async.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c index 5181f48ea..ba58ebf2b 100644 --- a/libnautilus-private/nautilus-directory-async.c +++ b/libnautilus-private/nautilus-directory-async.c @@ -478,6 +478,7 @@ directory_count_cancel (NautilusDirectory *directory) { if (directory->details->count_in_progress != NULL) { g_cancellable_cancel (directory->details->count_in_progress->cancellable); + directory->details->count_in_progress = NULL; } } -- cgit v1.2.1