diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-12-19 18:43:38 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-12-19 18:43:38 +0100 |
commit | 3636ea628d051cf2ba7a9038c50528c561d0aeaa (patch) | |
tree | 87664b904950052e8b6997a371ed5ecb1ea4b310 /src/topology | |
parent | 74d7528e6bd53cf5acc939c63a5be74a001e5ce1 (diff) | |
download | gnunet-3636ea628d051cf2ba7a9038c50528c561d0aeaa.tar.gz gnunet-3636ea628d051cf2ba7a9038c50528c561d0aeaa.zip |
change GNUNET_DISK_fn_write() to always do atomic writes and to NOT overwrite existing files; also change the return value to not return the size of the written file but GNUNET_OK on success, and integrate creating the directory if needed; breaks API, hence bumping libgnunetutil version
Diffstat (limited to 'src/topology')
-rw-r--r-- | src/topology/friends.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/topology/friends.c b/src/topology/friends.c index a3b15d8f7..65c7e81d7 100644 --- a/src/topology/friends.c +++ b/src/topology/friends.c | |||
@@ -59,15 +59,6 @@ GNUNET_FRIENDS_parse (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
59 | "FRIENDS"); | 59 | "FRIENDS"); |
60 | return GNUNET_SYSERR; | 60 | return GNUNET_SYSERR; |
61 | } | 61 | } |
62 | if (GNUNET_SYSERR == | ||
63 | GNUNET_DISK_directory_create_for_file (fn)) | ||
64 | { | ||
65 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, | ||
66 | "mkdir", | ||
67 | fn); | ||
68 | GNUNET_free (fn); | ||
69 | return GNUNET_SYSERR; | ||
70 | } | ||
71 | if ((GNUNET_OK != | 62 | if ((GNUNET_OK != |
72 | GNUNET_DISK_file_test (fn)) && | 63 | GNUNET_DISK_file_test (fn)) && |
73 | (GNUNET_OK != | 64 | (GNUNET_OK != |