From f1d7344715f3347466c717e5d52d1a11ed9d3c03 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Fri, 20 Mar 2020 18:27:30 +0000 Subject: [PATCH] Amend remote --tell option This option did not give output if the current folder did not contain an image. The option now returns the current folder full path, terminated by the directory separator. --- src/remote.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/remote.c b/src/remote.c index b3c51c39..0c903cc9 100644 --- a/src/remote.c +++ b/src/remote.c @@ -975,13 +975,17 @@ static void gr_file_tell(const gchar *text, GIOChannel *channel, gpointer data) { out_string = g_strconcat(image_get_path(lw_id->image), NULL); } + } + else + { + out_string = g_strconcat(lw_id->dir_fd->path, G_DIR_SEPARATOR_S, NULL); + } - g_io_channel_write_chars(channel, out_string, -1, NULL, NULL); - g_io_channel_write_chars(channel, "", -1, NULL, NULL); + g_io_channel_write_chars(channel, out_string, -1, NULL, NULL); + g_io_channel_write_chars(channel, "", -1, NULL, NULL); - g_free(collection_name); - g_free(out_string); - } + g_free(collection_name); + g_free(out_string); } static void gr_file_info(const gchar *text, GIOChannel *channel, gpointer data) -- 2.20.1