[gtk/wip/oholy/placesview-default-location-regression-gtk-3-34] placesview: Open location even if mount was not found
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/oholy/placesview-default-location-regression-gtk-3-34] placesview: Open location even if mount was not found
- Date: Wed, 21 Apr 2021 13:39:50 +0000 (UTC)
commit 4fe7b3ec25a1a82e0682963a26bbe642072b4fa0
Author: Ondrej Holy <oholy redhat com>
Date: Tue Apr 13 15:55:19 2021 +0200
placesview: Open location even if mount was not found
Some locations have to be mounted, but their mounts are not user-visible
(e.g. smb-browse). Though this is maybe a bit weird, it is how it works
for years. The problem is that the commit 267ea755, which tries to get the
default location for opening, caused regression as it doesn't expect such
possibility. Before this commit, such locations were opened without any
issue, but nothing happens currently after clicking to "Connect" except of
clearing the "Connect to Server" entry. Let's fallback to the original
location if the mount was not found to fix this regression.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1811
gtk/gtkplacesview.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 62eb5d0914..89f7acef2c 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1267,6 +1267,11 @@ server_mount_ready_cb (GObject *source_file,
GMount *mount;
GFile *root;
+ /*
+ * If the mount is not found at this point, it is probably user-
+ * invisible, which happens e.g for smb-browse, but the location
+ * should be opened anyway...
+ */
mount = g_file_find_enclosing_mount (location, priv->cancellable, NULL);
if (mount)
{
@@ -1277,6 +1282,10 @@ server_mount_ready_cb (GObject *source_file,
g_object_unref (root);
g_object_unref (mount);
}
+ else
+ {
+ emit_open_location (view, location, priv->open_flags);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]