Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit fc34453e authored by Rob Swindell's avatar Rob Swindell 💬

BadFilename text.dat string is now a format string

(prints the bad filename)
- also, checkfname() is going to do the file.can (trashcan) checking, so no need here
parent b417647b
......@@ -130,7 +130,7 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode,
if(mode&WM_FILE) {
if(!checkfname(title)) {
bputs(text[BadFilename]);
bprintf(text[BadFilename], title);
(void)remove(msgpath);
return(false);
}
......
......@@ -276,10 +276,9 @@ bool sbbs_t::upload(uint dirnum)
f.dir=curdirnum=dirnum;
bputs(text[Filename]);
if(getstr(fname, sizeof(fname) - 1, 0) < 1 || strchr(fname,'?') || strchr(fname,'*')
|| !checkfname(fname) || (trashcan(fname,"file") && !dir_op(dirnum))) {
if(getstr(fname, sizeof(fname) - 1, 0) < 1 || strchr(fname,'?') || strchr(fname,'*') || !checkfname(fname)) {
if(fname[0])
bputs(text[BadFilename]);
bprintf(text[BadFilename], fname);
return(false);
}
if(dirnum==cfg.sysop_dir)
......
......@@ -486,7 +486,7 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, long mode,
}
if((mode&WM_FILE) && !checkfname(subj)) {
free(buf);
bputs(text[BadFilename]);
bprintf(text[BadFilename], subj);
return(false);
}
if(!(mode&(WM_EMAIL|WM_NETMAIL)) && cfg.sub[subnum]->misc&SUB_QNET
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment