[gnome-utils/gnome-2-26] Fix bug #581002 - Baobab crashes when scan is pointed to a de-selected mount point



commit b04af8b94ad9450f234b4f171d52ab4970433cb6
Author: Fabio Marzocca <thesaltydog gmail com>
Date:   Fri May 1 16:09:28 2009 +0200

    Fix bug #581002  - Baobab crashes when scan is pointed to a de-selected mount point
    
    Reworked code in baobab-utils.c in order to trap a request to scan a mount point
    which was previously deselected in preferences.

 baobab/src/baobab-utils.c |    5 +++++
 baobab/src/baobab.c       |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/baobab/src/baobab-utils.c b/baobab/src/baobab-utils.c
index c257a01..43cddd4 100644
--- a/baobab/src/baobab-utils.c
+++ b/baobab/src/baobab-utils.c
@@ -281,6 +281,11 @@ baobab_check_dir (GFile	*file)
 	GError *error = NULL;
 	gboolean ret = TRUE;
 
+	if (baobab_is_excluded_location (file)) {
+		message("", _("Cannot check an excluded folder!"), GTK_MESSAGE_INFO, baobab.window);
+		return FALSE;
+		}
+
 	info = g_file_query_info (file,
 				  G_FILE_ATTRIBUTE_STANDARD_TYPE,
 				  G_FILE_QUERY_INFO_NONE,
diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c
index de0f841..30ace30 100644
--- a/baobab/src/baobab.c
+++ b/baobab/src/baobab.c
@@ -913,10 +913,6 @@ initialize_ringschart (void)
 static gboolean
 start_proc_on_command_line (GFile *file)
 {
-	if (baobab_is_excluded_location (file)) {
-		message("", _("Cannot check an excluded folder!"), GTK_MESSAGE_INFO, baobab.window);
-		return FALSE;
-		}
 		
 	baobab_scan_location (file);
 



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