summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-01-05 13:24:04 +0100
committerStefano Karapetsas <[email protected]>2012-01-05 13:24:04 +0100
commited06682bcd7a122b3b4ada110c152ccb3bbd0208 (patch)
treea4b6dbe2969603f8c9907aeb7633b06d105feae7 /src
parentb375acb5643b75e65f2573f686f1ad5ad635726c (diff)
downloadcaja-ed06682bcd7a122b3b4ada110c152ccb3bbd0208.tar.bz2
caja-ed06682bcd7a122b3b4ada110c152ccb3bbd0208.tar.xz
pathbar: remove buttons only if the gone file is below the current
This should fix once and for all the crashers when ejecting devices Patch by Cosimo Cecchi <[email protected]> http://git.gnome.org/browse/nautilus/commit/?h=gnome-2-32&id=c3b54e662b52ca15d1dcbe68386b8fa82b12adc5
Diffstat (limited to 'src')
-rw-r--r--src/caja-pathbar.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 1e810c19..5a431b1c 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -1765,10 +1765,12 @@ button_data_file_changed (CajaFile *file,
{
gint idx, position;
- /* if the current location is gone, don't do anything, as the view
- * will get the event too and call us back.
- */
- if (caja_file_compare_location (file, current_button_data->file) != 0)
+ /* if the current or a parent location are gone, don't do anything, as the view
+ * will get the event too and call us back.
+ */
+ current_location = caja_file_get_location (current_button_data->file);
+
+ if (g_file_has_prefix (location, current_location))
{
/* remove this and the following buttons */
position = g_list_position (path_bar->button_list,
@@ -1784,6 +1786,7 @@ button_data_file_changed (CajaFile *file,
}
}
+ g_object_unref (current_location);
g_object_unref (location);
return;
}