From 082fc7479627a3d2c1343d3184db01ce7c3fb6bb Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 17 Oct 2008 17:18:13 +0000 Subject: Don't immediately recreate NautilusFile for the bookmark when the file is 2008-10-17 Alexander Larsson * libnautilus-private/nautilus-bookmark.c: (bookmark_file_changed_callback): Don't immediately recreate NautilusFile for the bookmark when the file is deleted, as this can cause loops if the file is monitored. See https://bugzilla.redhat.com/show_bug.cgi?id=465479 svn path=/trunk/; revision=14734 --- libnautilus-private/nautilus-bookmark.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libnautilus-private/nautilus-bookmark.c') diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c index fe1ea89d0..5322dda6a 100644 --- a/libnautilus-private/nautilus-bookmark.c +++ b/libnautilus-private/nautilus-bookmark.c @@ -388,13 +388,19 @@ bookmark_file_changed_callback (NautilusFile *file, NautilusBookmark *bookmark) if (nautilus_file_is_gone (file) || nautilus_file_is_in_trash (file)) { /* The file we were monitoring has been trashed, deleted, - * or moved in a way that we didn't notice. Make + * or moved in a way that we didn't notice. We should make * a spanking new NautilusFile object for this * location so if a new file appears in this place - * we will notice. + * we will notice. However, we can't immediately do so + * because creating a new NautilusFile directly as a result + * of noticing a file goes away may trigger i/o on that file + * again, noticeing it is gone, leading to a loop. + * So, the new NautilusFile is created when the bookmark + * is used again. However, this is not really a problem, as + * we don't want to change the icon or anything about the + * bookmark just because its not there anymore. */ nautilus_bookmark_disconnect_file (bookmark); - should_emit_appearance_changed_signal = TRUE; } else if (nautilus_bookmark_update_icon (bookmark)) { /* File hasn't gone away, but it has changed * in a way that affected its icon. -- cgit v1.2.1