summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-11 21:55:51 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-11 21:55:51 +0200
commitf490c0f3f5beb9ada5d05e01a6a01889d9902a2b (patch)
treecd2f9e25f7a2be6663b535d5721c172c0053a8e9 /src/util
parent90ff9edfa9c5fcfa3a36d1653ff105e89b888e21 (diff)
do create directory if it doesn't exist
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto_ecc_setup.c8
1 files changed, 8 insertions, 0 deletions
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;