diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:55:51 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:55:51 +0200 |
commit | f490c0f3f5beb9ada5d05e01a6a01889d9902a2b (patch) | |
tree | cd2f9e25f7a2be6663b535d5721c172c0053a8e9 | |
parent | 90ff9edfa9c5fcfa3a36d1653ff105e89b888e21 (diff) | |
download | gnunet-f490c0f3f5beb9ada5d05e01a6a01889d9902a2b.tar.gz gnunet-f490c0f3f5beb9ada5d05e01a6a01889d9902a2b.zip |
do create directory if it doesn't exist
-rw-r--r-- | src/util/crypto_ecc_setup.c | 8 |
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, | |||
143 | char *tmpl; | 143 | char *tmpl; |
144 | int fd; | 144 | int fd; |
145 | 145 | ||
146 | if (GNUNET_OK != | ||
147 | GNUNET_DISK_directory_create_for_file (filename)) | ||
148 | { | ||
149 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, | ||
150 | "mkstemp", | ||
151 | filename); | ||
152 | return GNUNET_SYSERR; | ||
153 | } | ||
146 | { | 154 | { |
147 | char *dname; | 155 | char *dname; |
148 | 156 | ||