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;