Skip to content
Snippets Groups Projects
Commit 0e14245f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

If the quotes.txt file doesn't exist with the right case, try any case

(but prefer the proper/configured case, based on config in SCFG).

Works around a problem where DDMsgReader always creates QUOTES.TXT (never
quotes.txt), but SBBS tries to read in the file with the case it expects.
This wouldn't be a problem on case-insensitive file systems (Windows).

Resolves the writemsg.cpp error reported by Nelgin
parent f42e48ca
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -340,7 +340,8 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, int mode,
/* Quote entire message to MSGTMP or INPUT.MSG */
if(useron_xedit && cfg.xedit[useron_xedit-1]->misc&QUOTEALL) {
quotes_fname(useron_xedit, path, sizeof(path));
if(!quotes_fname(useron_xedit, path, sizeof(path)))
fexistcase(path);
if((stream=fnopen(NULL,path,O_RDONLY))==NULL) {
errormsg(WHERE,ERR_OPEN,path,O_RDONLY);
free(buf);
......@@ -377,7 +378,8 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, int mode,
;
else if(yesno(text[QuoteMessageQ])) {
quotes_fname(useron_xedit, path, sizeof(path));
if(!quotes_fname(useron_xedit, path, sizeof(path)))
fexistcase(path);
if((stream=fnopen(&file,path,O_RDONLY))==NULL) {
errormsg(WHERE,ERR_OPEN,path,O_RDONLY);
free(buf);
......
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