summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-12-14 19:11:17 +0100
committerCarlos Soriano <csoriano@gnome.org>2015-12-14 19:23:39 +0100
commitc2b72973dcc4013caef59607f2f30babb248af42 (patch)
tree08ca8f6228442a42adec179e727736ada7642a37
parent6aedbfe023cce889df17164e7df5ec90a5cbf283 (diff)
downloadnautilus-c2b72973dcc4013caef59607f2f30babb248af42.tar.gz
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
-rw-r--r--libnautilus-private/nautilus-directory-async.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c
index 58b6d02bf..56893e035 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;
}
}