Skip to content
Snippets Groups Projects
Commit 4264b42c authored by rswindell's avatar rswindell
Browse files

In sbbs.editfile() If the editor returns non-zero, don't save any changes to

the file.
parent f92a781f
No related branches found
No related tags found
No related merge requests found
...@@ -990,11 +990,12 @@ void sbbs_t::editfile(char *fname) ...@@ -990,11 +990,12 @@ void sbbs_t::editfile(char *fname)
} }
CLS; CLS;
rioctl(IOCM|PAUSE|ABORT); rioctl(IOCM|PAUSE|ABORT);
external(cmdstr(cfg.xedit[useron.xedit-1]->rcmd,msgtmp,nulstr,NULL),mode,cfg.node_dir); if(external(cmdstr(cfg.xedit[useron.xedit-1]->rcmd,msgtmp,nulstr,NULL),mode,cfg.node_dir)==0) {
l=process_edited_file(msgtmp, path, /* mode: */0, &lines); l=process_edited_file(msgtmp, path, /* mode: */0, &lines);
SAFEPRINTF4(str,"%s created or edited file: %s (%u bytes, %u lines)" SAFEPRINTF4(str,"%s created or edited file: %s (%u bytes, %u lines)"
,useron.alias, path, l, lines); ,useron.alias, path, l, lines);
logline(nulstr,str); logline(nulstr,str);
}
rioctl(IOSM|PAUSE|ABORT); rioctl(IOSM|PAUSE|ABORT);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment