summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-12-19 17:01:17 +0100
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2020-12-19 23:33:13 +0000
commit84708915aa33c4b6354355bf18322861a23508bf (patch)
tree94e333a13508305ae08eaa40c51150f33badd343
parentf02652167d6544f66236736d2a408324dfc8aa07 (diff)
downloadnautilus-84708915aa33c4b6354355bf18322861a23508bf.tar.gz
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
-rw-r--r--src/nautilus-file-utilities.c10
1 files changed, 0 insertions, 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;