diff options
author | June McEnroe <june@causal.agency> | 2020-04-13 11:20:44 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-13 11:20:44 -0400 |
commit | a0423730e77803a95fb52ba67856b52221a246ae (patch) | |
tree | aa97e81dd34b7e0fd8a7a3aa31510710c545c89a | |
parent | Concatenate HTML threads (diff) | |
download | bubger-a0423730e77803a95fb52ba67856b52221a246ae.tar.gz bubger-a0423730e77803a95fb52ba67856b52221a246ae.zip |
Fix concatHTML thread nesting
-rw-r--r-- | concat.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |