From: Christian Grothoff Date: Fri, 12 Mar 2010 14:35:37 +0000 (+0000) Subject: init X-Git-Tag: initial-import-from-subversion-38251~22495 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fba12e5552667f6ae8521c9f955fa8279e0165a3;p=oweals%2Fgnunet.git init --- 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,