From 1a6637aa038d80b009fd1647da0bf034d36a1049 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 27 Oct 2018 22:41:18 +1000 Subject: [PATCH] Fixes for QWK scan --- utils/qwknet/qwkscan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/qwknet/qwkscan.c b/utils/qwknet/qwkscan.c index bbc19af..d04d800 100644 --- a/utils/qwknet/qwkscan.c +++ b/utils/qwknet/qwkscan.c @@ -262,7 +262,7 @@ int export_messages(int baseno, char *basefilename, int qwkidx) { fptr = fopen(buffer, "r+"); if (!fptr) { fptr = fopen(buffer, "w"); - if (!fptr) { + if (fptr) { memset(text, ' ', 128); memcpy(text, hostid, strlen(hostid)); fwrite(text, 128, 1, fptr); @@ -336,6 +336,8 @@ int main(int argc, char **argv) { exit(-1); } + mkdir(temp_dir, 0755); + for (i=0;ibaseno, msgbases[i]->path, qwkidx); qwkidx += msgcount;