]> Pileus Git - ~andy/gtk/commitdiff
Only get the base path of the volume if it is mounted.
authorFederico Mena Quintero <federico@ximian.com>
Fri, 11 Nov 2005 19:29:44 +0000 (19:29 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Fri, 11 Nov 2005 19:29:44 +0000 (19:29 +0000)
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
the base path of the volume if it is mounted.

ChangeLog
ChangeLog.pre-2-10
gtk/gtkfilechooserdefault.c

index 5d6ca97c3c35a99e7f768b31e3c083fadba8d24d..7fc0c8fe3b10206e6685ef18c090318f78998fa2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-11  Federico Mena Quintero  <federico@ximian.com>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
+       the base path of the volume if it is mounted.
+
 2005-11-11  Michael Natterer  <mitch@imendio.com>
 
        Added per-stepper API for GtkRange's stepper sensitivity as
index 5d6ca97c3c35a99e7f768b31e3c083fadba8d24d..7fc0c8fe3b10206e6685ef18c090318f78998fa2 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-11  Federico Mena Quintero  <federico@ximian.com>
+
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
+       the base path of the volume if it is mounted.
+
 2005-11-11  Michael Natterer  <mitch@imendio.com>
 
        Added per-stepper API for GtkRange's stepper sensitivity as
index a9db44675ee2e474b93b64de4bad8f77b7007ef6..998a6eb99bacc8738942a8239fd91e56d7d54b77 100644 (file)
@@ -1540,16 +1540,21 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
 
       if (impl->local_only)
        {
-         GtkFilePath *base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
-         if (base_path != NULL)
+         if (gtk_file_system_volume_get_is_mounted (impl->file_system, volume))
            {
-             gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
-             gtk_file_path_free (base_path);
-             
-             if (!is_local)
+             GtkFilePath *base_path;
+
+             base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
+             if (base_path != NULL)
                {
-                 gtk_file_system_volume_free (impl->file_system, volume);
-                 continue;
+                 gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
+                 gtk_file_path_free (base_path);
+
+                 if (!is_local)
+                   {
+                     gtk_file_system_volume_free (impl->file_system, volume);
+                     continue;
+                   }
                }
            }
        }