From 8adeb4a187406881de7850ea405dc352e590b255 Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Thu, 18 Jun 2015 09:20:37 +0200 Subject: gvfs-ls: Complete mounts with terminating slash g_file_get_uri returns uris without terminating slash if there is a path element, e.g.: dav://server/ dav://server/path We have to be sure that terminating slash is appended for mounts when listing possible completions, because mounts are always directories. https://bugzilla.gnome.org/show_bug.cgi?id=751145 --- programs/gvfs-ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/gvfs-ls.c b/programs/gvfs-ls.c index e29c99d7..160895a3 100644 --- a/programs/gvfs-ls.c +++ b/programs/gvfs-ls.c @@ -218,7 +218,7 @@ print_mounts (const char *prefix) uri = g_file_get_uri (mount_root); if (prefix == NULL || g_str_has_prefix (uri, prefix)) - g_print ("%s\n", uri); + g_print ("%s%s\n", uri, g_str_has_suffix (uri, "/") ? "" : "/"); g_free (uri); g_object_unref (mount_root); g_object_unref (mount); -- cgit v1.2.1