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

If "Lowercase filename" option used for external editor drop file, then create

the "MSGTMP" filename as lowercase too.
Detect changed case of filename when returning from external editor.
parent 47ce7265
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,8 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
sprintf(msgtmp,"%sMSGTMP",cfg.node_dir); /* QuickBBS editors are dumb */
else
sprintf(msgtmp,"%sINPUT.MSG",cfg.temp_dir);
if(useron.xedit && cfg.xedit[useron.xedit-1]->misc&XTRN_LWRCASE)
strlwr(msgtmp);
if(mode&WM_QUOTE && !(useron.rest&FLAG('J'))
&& ((mode&(WM_EMAIL|WM_NETMAIL) && cfg.sys_misc&SM_QUOTE_EM)
......@@ -327,7 +329,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
if(useron.xedit && cfg.xedit[useron.xedit-1]->misc&XTRN_SH)
ex_mode|=EX_SH;
if(!linesquoted && fexist(msgtmp))
if(!linesquoted && fexistcase(msgtmp))
remove(msgtmp);
if(linesquoted) {
qlen=flength(msgtmp);
......@@ -349,7 +351,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
rioctl(IOSM|PAUSE|ABORT);
}
checkline();
if(!fexist(msgtmp) || !online
if(!fexistcase(msgtmp) || !online
|| (linesquoted && qlen==flength(msgtmp) && qtime==fdate(msgtmp))) {
free(buf);
return(false);
......@@ -1179,6 +1181,8 @@ void sbbs_t::editmsg(smbmsg_t *msg, uint subnum)
sprintf(msgtmp,"%sMSGTMP",cfg.node_dir); /* QuickBBS editors are dumb */
else
sprintf(msgtmp,"%sINPUT.MSG",cfg.temp_dir);
if(useron.xedit && cfg.xedit[useron.xedit-1]->misc&XTRN_LWRCASE)
strlwr(msgtmp);
remove(msgtmp);
msgtotxt(msg,msgtmp,0,1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment