From: Christian Grothoff Date: Tue, 28 Feb 2017 18:56:37 +0000 (+0100) Subject: get rid of warning for missing directory on friends.txt creation X-Git-Tag: taler-0.2.1~8^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6ece270b1f87ef98a9df8ee6a4c08db4a131b8b9;p=oweals%2Fgnunet.git get rid of warning for missing directory on friends.txt creation --- diff --git a/src/topology/friends.c b/src/topology/friends.c index 59c70e4b0..a960fad17 100644 --- a/src/topology/friends.c +++ b/src/topology/friends.c @@ -58,14 +58,20 @@ GNUNET_FRIENDS_parse (const struct GNUNET_CONFIGURATION_Handle *cfg, return GNUNET_SYSERR; } if ( (GNUNET_OK != GNUNET_DISK_file_test (fn)) && - (GNUNET_OK != GNUNET_DISK_fn_write (fn, NULL, 0, + (GNUNET_OK != GNUNET_DISK_fn_write (fn, + NULL, + 0, GNUNET_DISK_PERM_USER_READ | - GNUNET_DISK_PERM_USER_WRITE)) ) - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn); + GNUNET_DISK_PERM_USER_WRITE | + GNUNET_DISK_OPEN_CREATE)) ) + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, + "write", + fn); if ( (GNUNET_OK != GNUNET_DISK_file_size (fn, &fsize, - GNUNET_NO, GNUNET_YES)) || + GNUNET_NO, + GNUNET_YES)) || (0 == fsize) ) { GNUNET_free (fn); @@ -93,8 +99,8 @@ GNUNET_FRIENDS_parse (const struct GNUNET_CONFIGURATION_Handle *cfg, pos++; if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (&data[start], - pos - start, - &pid.public_key)) + pos - start, + &pid.public_key)) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Syntax error in FRIENDS file at offset %llu, skipping bytes `%.*s'.\n"),