From fba12e5552667f6ae8521c9f955fa8279e0165a3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 12 Mar 2010 14:35:37 +0000 Subject: [PATCH] init --- src/fs/gnunet-publish.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index db4ea978e..860a81522 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c @@ -441,19 +441,24 @@ run (void *cls, } emsg = NULL; if (0 != STAT (args[0], &sbuf)) - GNUNET_asprintf (&emsg, - _("Could not access file: %s\n"), - STRERROR (errno)); + { + GNUNET_asprintf (&emsg, + _("Could not access file: %s\n"), + STRERROR (errno)); + fi = NULL; + } else if (S_ISDIR (sbuf.st_mode)) - fi = GNUNET_FS_file_information_create_from_directory (NULL, - args[0], - &GNUNET_FS_directory_scanner_default, - l, - !do_insert, - anonymity, - priority, - GNUNET_TIME_relative_to_absolute (DEFAULT_EXPIRATION), - &emsg); + { + fi = GNUNET_FS_file_information_create_from_directory (NULL, + args[0], + &GNUNET_FS_directory_scanner_default, + l, + !do_insert, + anonymity, + priority, + GNUNET_TIME_relative_to_absolute (DEFAULT_EXPIRATION), + &emsg); + } else { fi = GNUNET_FS_file_information_create_from_file (NULL, -- 2.25.1