From aa83696e631e8025a7db809c5973459e23bc80f4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 12 Feb 2019 16:09:20 +0100 Subject: [PATCH] fix #5460 --- src/fs/gnunet-search.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 57d8eed5d..3995b1b5b 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c @@ -172,8 +172,11 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) is_directory = GNUNET_FS_meta_data_test_for_directory (info->value.search. specifics.result.meta); - if (filename != NULL) + if (NULL != filename) { + while ( (filename[0] != '\0') && + ('/' == filename[strlen(filename)-1]) ) + filename[strlen(filename)-1] = '\0'; GNUNET_DISK_filename_canonicalize (filename); if (GNUNET_YES == is_directory) printf ("gnunet-download -o \"%s%s\" -R %s\n", filename, GNUNET_FS_DIRECTORY_EXT, uri); -- 2.25.1