summaryrefslogtreecommitdiffstats
path: root/skull.c
diff options
context:
space:
mode:
authorErik K <erikk@previousplan.org>2022-05-26 16:31:27 +0000
committerErik K <erikk@previousplan.org>2022-05-26 16:31:27 +0000
commit61d75021c8a1180d2b591e70c783bd2eb21188bd (patch)
treee5401f7c66da4b41eb1bc7f01a8e98a38f8ceae8 /skull.c
parent9643e3cb444ee26088be4636ba2b753ac0166156 (diff)
mkdir parent directories when needed, also fixed bug in list().HEADmaster
Diffstat (limited to 'skull.c')
-rw-r--r--skull.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/skull.c b/skull.c
index 5c44f20..4c66833 100644
--- a/skull.c
+++ b/skull.c
@@ -64,6 +64,8 @@ href=\"mailto:erikk@previousplan.org\">erikk@previousplan.org</a> \
snprintf(path, sizeof(path), "%s/%s", kcontentdir, doc[i]->filename);
snprintf(outpath, sizeof(outpath), "%s/%s", kskullexport, doc[i]->filename);
+ if (!mkparentdirs(outpath))
+ continue;
if ((outf = fopen(outpath, "w")) == NULL) {
fprintf(stderr, "%s: %s\n", outpath, strerror(errno));
continue;