From 33dec973f110cef3019a83c1d5cc50ee37d31567 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 15 Apr 2016 21:11:47 +1000 Subject: [PATCH] Fix creation of node directories when using external editor --- mail_menu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mail_menu.c b/mail_menu.c index 8451949..512fc9d 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -278,6 +278,12 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from c = s_getc(socket); if (tolower(c) == 'y') { + sprintf(buffer, "%s/node%d", conf.bbs_path, mynode); + + if (stat(buffer, &s) != 0) { + mkdir(buffer, 0755); + } + sprintf(buffer, "%s/node%d/MSGTMP", conf.bbs_path, mynode); if (stat(buffer, &s) == 0) {