From 4017313317bd9c642127c102b5d7d83da72f0071 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 11 Aug 2004 19:21:42 +0000 Subject: [PATCH] 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. --- src/sbbs3/writemsg.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp index 02fce521a7..4d81a5fd44 100644 --- a/src/sbbs3/writemsg.cpp +++ b/src/sbbs3/writemsg.cpp @@ -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); -- GitLab