From f490c0f3f5beb9ada5d05e01a6a01889d9902a2b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 11 Apr 2020 21:55:51 +0200 Subject: [PATCH] do create directory if it doesn't exist --- src/util/crypto_ecc_setup.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.25.1