Forgot to delete temp directory

This commit is contained in:
Andrew Pamment 2016-12-07 11:56:33 +10:00
parent d568da0b65
commit 145005129c

View File

@ -237,7 +237,7 @@ char *get_file_id_diz(char *filename) {
} }
snprintf(buffer, 1024, "%s/node%d/temp", conf.bbs_path, mynode); snprintf(buffer, 1024, "%s/node%d/temp", conf.bbs_path, mynode);
if (stat(buffer, &s) != 0) { if (stat(buffer, &s) == 0) {
if (recursive_delete(buffer) != 0) { if (recursive_delete(buffer) != 0) {
return NULL; return NULL;
@ -297,6 +297,9 @@ char *get_file_id_diz(char *filename) {
} }
description[bpos] = '\0'; description[bpos] = '\0';
snprintf(buffer, 1024, "%s/node%d/temp", conf.bbs_path, mynode);
recursive_delete(buffer);
return description; return description;
} }