summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-02-07 09:25:01 +0100
committerdefault <nobody@localhost>2023-02-07 09:25:01 +0100
commit67f2d4318d76b305ab98a48ff48b47e2e87126c2 (patch)
treee8c72fcf2aaf9ff0f8ec59dd07894736d0ab01ac /data.c
parent392c5147a396ab166dc04494e59f3f096e25e251 (diff)
New utility function mkdirx().
Diffstat (limited to 'data.c')
-rw-r--r--data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/data.c b/data.c
index 7b57003..3827422 100644
--- a/data.c
+++ b/data.c
@@ -88,7 +88,7 @@ int srv_open(char *basedir, int auto_upgrade)
/* create the queue/ subdir, just in case */
xs *qdir = xs_fmt("%s/queue", srv_basedir);
- mkdir(qdir, DIR_PERM);
+ mkdirx(qdir);
#ifdef __OpenBSD__
char *v = xs_dict_get(srv_config, "disable_openbsd_security");
@@ -434,7 +434,7 @@ d_char *_object_fn_by_md5(const char *md5)
{
xs *bfn = xs_fmt("%s/object/%c%c", srv_basedir, md5[0], md5[1]);
- mkdir(bfn, DIR_PERM);
+ mkdirx(bfn);
return xs_fmt("%s/%s.json", bfn, md5);
}