summaryrefslogtreecommitdiff
path: root/src/gtk/nautilusgtkplacesview.c
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-12-19 17:37:52 +0100
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2020-12-19 23:33:13 +0000
commit5b0301b0d65fb30513c63b4511cc207b4f64c602 (patch)
tree7265ea1336c1c65c4b7c33a8fa5ef56e3b4e2253 /src/gtk/nautilusgtkplacesview.c
parent84708915aa33c4b6354355bf18322861a23508bf (diff)
downloadnautilus-5b0301b0d65fb30513c63b4511cc207b4f64c602.tar.gz
gtkplacesview: Update to latest codewip/oholy/pathbar-default-locaton
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1319
Diffstat (limited to 'src/gtk/nautilusgtkplacesview.c')
-rw-r--r--src/gtk/nautilusgtkplacesview.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
index af05540f2..ae35daa60 100644
--- a/src/gtk/nautilusgtkplacesview.c
+++ b/src/gtk/nautilusgtkplacesview.c
@@ -1262,7 +1262,21 @@ server_mount_ready_cb (GObject *source_file,
gtk_entry_set_text (GTK_ENTRY (priv->address_entry), "");
if (priv->should_open_location)
- emit_open_location (view, location, priv->open_flags);
+ {
+ GMount *mount;
+ GFile *root;
+
+ mount = g_file_find_enclosing_mount (location, priv->cancellable, NULL);
+ if (mount)
+ {
+ root = g_mount_get_default_location (mount);
+
+ emit_open_location (view, root, priv->open_flags);
+
+ g_object_unref (root);
+ g_object_unref (mount);
+ }
+ }
}
update_places (view);