@@ -953,7 +953,7 @@ update_places (NemoPlacesSidebar *sidebar)
953953 }
954954 volume = g_mount_get_volume (mount );
955955 if (volume != NULL ) {
956- g_object_unref (volume );
956+ g_object_unref (volume );
957957 g_object_unref (mount );
958958 continue ;
959959 }
@@ -987,22 +987,8 @@ update_places (NemoPlacesSidebar *sidebar)
987987 }
988988 }
989989
990- icon = nemo_get_mount_icon_name (mount );
991- mount_uri = g_file_get_uri (root );
992- name = g_mount_get_name (mount );
993- tooltip = g_file_get_parse_name (root );
994- place_info = new_place_info (PLACES_MOUNTED_VOLUME ,
995- SECTION_DEVICES ,
996- name , icon , mount_uri ,
997- NULL , NULL , mount , 0 , tooltip , 0 , FALSE);
998- place_infos = g_list_prepend (place_infos , place_info );
999990 g_object_unref (root );
1000991 g_object_unref (mount );
1001- g_free (icon );
1002- g_free (name );
1003- g_free (mount_uri );
1004- g_free (tooltip );
1005-
1006992 }
1007993 g_list_free (mounts );
1008994
@@ -1027,6 +1013,12 @@ update_places (NemoPlacesSidebar *sidebar)
10271013
10281014 mount = g_volume_get_mount (volume );
10291015 if (mount != NULL ) {
1016+ if (g_mount_is_shadowed (mount )) {
1017+ g_object_unref (mount );
1018+ g_object_unref (volume );
1019+ continue ;
1020+ }
1021+
10301022 gchar * full_display_name , * volume_id ;
10311023 /* Show mounted volume in the sidebar */
10321024 icon = nemo_get_mount_icon_name (mount );
@@ -1141,6 +1133,12 @@ update_places (NemoPlacesSidebar *sidebar)
11411133
11421134 mount = g_volume_get_mount (volume );
11431135 if (mount != NULL ) {
1136+ if (g_mount_is_shadowed (mount )) {
1137+ g_object_unref (mount );
1138+ g_object_unref (volume );
1139+ continue ;
1140+ }
1141+
11441142 g_autofree gchar * parse_name = NULL ;
11451143 icon = nemo_get_mount_icon_name (mount );
11461144 root = g_mount_get_default_location (mount );
0 commit comments