[nautilus] places-sidebar: discard special dirs if they are assigned to the home



commit 18b496bc28a59987d161b5272244a808f5c06e2c
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Feb 23 17:25:44 2011 -0500

    places-sidebar: discard special dirs if they are assigned to the home
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643121

 src/nautilus-places-sidebar.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index b49533c..0b7ed64 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -703,7 +703,11 @@ update_places (NautilusPlacesSidebar *sidebar)
 
 		path = g_get_user_special_dir (index);
 
-		if (!path) {
+		/* xdg resets special dirs to the home directory in case
+		 * it's not finiding what it expects. We don't want the home
+		 * to be added multiple times in that weird configuration.
+		 */
+		if (!path || g_strcmp0 (path, g_get_home_dir ()) == 0) {
 			continue;
 		}
 



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