summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-12 16:09:20 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-12 16:09:20 +0100
commitaa83696e631e8025a7db809c5973459e23bc80f4 (patch)
treee267ba4da9736ccbc84d7e3e9ad1c4529157841d /src/fs
parentab1dd087129a4303e6caa793ec54747ec7a95163 (diff)
fix #5460
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-search.c5
1 files changed, 4 insertions, 1 deletions
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);