aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-28 19:56:37 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-28 19:56:37 +0100
commit6ece270b1f87ef98a9df8ee6a4c08db4a131b8b9 (patch)
tree47533f8be328f6e7c3ac78fe7edfe1f5bbc33c3e /src
parenta9a6b98c54f5cc3e680c8ea2f9c69e3955e2a7da (diff)
downloadgnunet-6ece270b1f87ef98a9df8ee6a4c08db4a131b8b9.tar.gz
gnunet-6ece270b1f87ef98a9df8ee6a4c08db4a131b8b9.zip
get rid of warning for missing directory on friends.txt creation
Diffstat (limited to 'src')
-rw-r--r--src/topology/friends.c18
1 files changed, 12 insertions, 6 deletions
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,
58 return GNUNET_SYSERR; 58 return GNUNET_SYSERR;
59 } 59 }
60 if ( (GNUNET_OK != GNUNET_DISK_file_test (fn)) && 60 if ( (GNUNET_OK != GNUNET_DISK_file_test (fn)) &&
61 (GNUNET_OK != GNUNET_DISK_fn_write (fn, NULL, 0, 61 (GNUNET_OK != GNUNET_DISK_fn_write (fn,
62 NULL,
63 0,
62 GNUNET_DISK_PERM_USER_READ | 64 GNUNET_DISK_PERM_USER_READ |
63 GNUNET_DISK_PERM_USER_WRITE)) ) 65 GNUNET_DISK_PERM_USER_WRITE |
64 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn); 66 GNUNET_DISK_OPEN_CREATE)) )
67 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
68 "write",
69 fn);
65 if ( (GNUNET_OK != 70 if ( (GNUNET_OK !=
66 GNUNET_DISK_file_size (fn, 71 GNUNET_DISK_file_size (fn,
67 &fsize, 72 &fsize,
68 GNUNET_NO, GNUNET_YES)) || 73 GNUNET_NO,
74 GNUNET_YES)) ||
69 (0 == fsize) ) 75 (0 == fsize) )
70 { 76 {
71 GNUNET_free (fn); 77 GNUNET_free (fn);
@@ -93,8 +99,8 @@ GNUNET_FRIENDS_parse (const struct GNUNET_CONFIGURATION_Handle *cfg,
93 pos++; 99 pos++;
94 if (GNUNET_OK != 100 if (GNUNET_OK !=
95 GNUNET_CRYPTO_eddsa_public_key_from_string (&data[start], 101 GNUNET_CRYPTO_eddsa_public_key_from_string (&data[start],
96 pos - start, 102 pos - start,
97 &pid.public_key)) 103 &pid.public_key))
98 { 104 {
99 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 105 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
100 _("Syntax error in FRIENDS file at offset %llu, skipping bytes `%.*s'.\n"), 106 _("Syntax error in FRIENDS file at offset %llu, skipping bytes `%.*s'.\n"),