[nautilus] Fix location check in should_close_with_mount



commit a3f5dde5051737beceeb6bc825758d0ecce1e3fd
Author: Luke Symes <allsymes gmail com>
Date:   Wed Feb 17 10:49:02 2010 +1300

    Fix location check in should_close_with_mount
    
    https://bugzilla.gnome.org/show_bug.cgi?id=318094

 src/nautilus-navigation-window-slot.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-navigation-window-slot.c b/src/nautilus-navigation-window-slot.c
index 237c3ff..f80e2ae 100644
--- a/src/nautilus-navigation-window-slot.c
+++ b/src/nautilus-navigation-window-slot.c
@@ -54,7 +54,8 @@ nautilus_navigation_window_slot_should_close_with_mount (NautilusNavigationWindo
 		bookmark = NAUTILUS_BOOKMARK (l->data);
 
 		bookmark_location = nautilus_bookmark_get_location (bookmark);
-		close_with_mount &= g_file_has_prefix (bookmark_location, mount_location);
+		close_with_mount &= g_file_has_prefix (bookmark_location, mount_location) ||
+				    g_file_equal (bookmark_location, mount_location);
 		g_object_unref (bookmark_location);
 
 		if (!close_with_mount) {
@@ -62,7 +63,8 @@ nautilus_navigation_window_slot_should_close_with_mount (NautilusNavigationWindo
 		}
 	}
 
-	close_with_mount &= g_file_has_prefix (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location);
+	close_with_mount &= g_file_has_prefix (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location) ||
+			    g_file_equal (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location);
 
 	/* we could also consider the forward list here, but since the â??go homeâ?? request
 	 * in nautilus-window-manager-views.c:mount_removed_callback() would discard those



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]