From e419f4fe662ae1549d08cd8c9e43e4e458e1ff97 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Wed, 1 Apr 2020 10:13:43 +0100 Subject: [PATCH] Expand ~ for --remote --get-filelist command Parameter was not expanded for ~ character --- src/remote.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/remote.c b/src/remote.c index a374cabc..2389a17a 100644 --- a/src/remote.c +++ b/src/remote.c @@ -823,6 +823,7 @@ static void get_filelist(const gchar *text, GIOChannel *channel, gboolean recurs FileData *fd; GString *out_string = g_string_new(NULL); GList *work; + gchar *tilde_filename; if (strcmp(text, "") == 0) { @@ -837,14 +838,17 @@ static void get_filelist(const gchar *text, GIOChannel *channel, gboolean recurs } else { - if (isdir(text)) + tilde_filename = expand_tilde(text); + if (isdir(tilde_filename)) { - dir_fd = file_data_new_dir(text); + dir_fd = file_data_new_dir(tilde_filename); } else { + g_free(tilde_filename); return; } + g_free(tilde_filename); } if (recurse) -- 2.20.1