From: Christian Grothoff Date: Sat, 11 Apr 2020 19:55:51 +0000 (+0200) Subject: do create directory if it doesn't exist X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f490c0f3f5beb9ada5d05e01a6a01889d9902a2b;p=oweals%2Fgnunet.git do create directory if it doesn't exist --- diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c index 5167a33fb..6c71030b2 100644 --- a/src/util/crypto_ecc_setup.c +++ b/src/util/crypto_ecc_setup.c @@ -143,6 +143,14 @@ atomic_write_to_file (const char *filename, char *tmpl; int fd; + if (GNUNET_OK != + GNUNET_DISK_directory_create_for_file (filename)) + { + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, + "mkstemp", + filename); + return GNUNET_SYSERR; + } { char *dname;