From a0423730e77803a95fb52ba67856b52221a246ae Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 13 Apr 2020 11:20:44 -0400 Subject: Fix concatHTML thread nesting --- concat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'concat.c') diff --git a/concat.c b/concat.c index 6d0e507..07d1f6f 100644 --- a/concat.c +++ b/concat.c @@ -81,17 +81,17 @@ static int concatHTML(FILE *file, struct List thread) { static char path[PATH_MAX]; int error; for (size_t i = 0; i < thread.len; ++i) { - error = htmlThreadOpen(file); - if (error) return error; if (thread.ptr[i].type == List) { error = concatHTML(file, thread.ptr[i].list); } else { uint32_t uid = dataCheck(thread.ptr[i], Number).number; - error = concatFile(file, pathUID(path, uid, "html")); + error = htmlThreadOpen(file) + || concatFile(file, pathUID(path, uid, "html")); } if (error) return error; } for (size_t i = 0; i < thread.len; ++i) { + if (thread.ptr[i].type == List) continue; error = htmlThreadClose(file); if (error) return error; } -- cgit 1.4.1