diff options
author | Ondrej Holy <oholy@redhat.com> | 2015-06-18 09:20:37 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2015-08-14 10:09:44 +0200 |
commit | 8adeb4a187406881de7850ea405dc352e590b255 (patch) | |
tree | 6ca3280de8fd7458d9d1fe6eb14e1d7cf8edaf77 | |
parent | 372679bd9aaf427ad6054405f544e92c4a19a5e1 (diff) | |
download | gvfs-8adeb4a187406881de7850ea405dc352e590b255.tar.gz |
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
-rw-r--r-- | programs/gvfs-ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |