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:18:11 +0100
commit764958a19ac8c83d0399455b0657f0c1d480f396 (patch)
treece8e1dda6c0cb933ba3d6cf716554f16953258b9
parent915711e6d9824fea3e5c66eea2cc174c8a618afc (diff)
downloadnautilus-764958a19ac8c83d0399455b0657f0c1d480f396.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 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;
}
}