[nautilus/wip/oholy/pathbar-default-locaton: 113/114] file-utilities: Do not use default location instead of root




commit 84708915aa33c4b6354355bf18322861a23508bf
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Dec 19 17:01:17 2019 +0100

    file-utilities: Do not use default location instead of root
    
    The default location (i.e. g_mount_get_default_location) should be
    used when opening mounted, but we should not use it instead of the root
    button in the path bar. Because it is currently impossible to navigate
    to parent folders if default location is set. Let's change
    nautilus_get_mounted_mount_for_root logic and return mount only for
    root path so we can see the real root in the path bar.
    
    https://gitlab.gnome.org/GNOME/nautilus/issues/1319

 src/nautilus-file-utilities.c | 10 ----------
 1 file changed, 10 deletions(-)
---
diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
index 2ee6e7c05..a3cc97b83 100644
--- a/src/nautilus-file-utilities.c
+++ b/src/nautilus-file-utilities.c
@@ -533,7 +533,6 @@ nautilus_get_mounted_mount_for_root (GFile *location)
     GMount *mount;
     GMount *result = NULL;
     GFile *root = NULL;
-    GFile *default_location = NULL;
 
     volume_monitor = g_volume_monitor_get ();
     mounts = g_volume_monitor_get_mounts (volume_monitor);
@@ -553,18 +552,9 @@ nautilus_get_mounted_mount_for_root (GFile *location)
             result = g_object_ref (mount);
             break;
         }
-
-        default_location = g_mount_get_default_location (mount);
-        if (!g_file_equal (default_location, root) &&
-            g_file_equal (location, default_location))
-        {
-            result = g_object_ref (mount);
-            break;
-        }
     }
 
     g_clear_object (&root);
-    g_clear_object (&default_location);
     g_list_free_full (mounts, g_object_unref);
 
     return result;


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