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 c1fe5a06 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Use K_TRIM getstr() mode when prompting for filenames

Don't need no stinking pre/appended white-space in our filenames!
parent 6438887a
Pipeline #2358 passed with stage
in 9 minutes and 12 seconds
......@@ -281,14 +281,14 @@ int sbbs_t::exec_function(csi_t *csi)
if(!chksyspass())
return(0);
bputs(text[Filename]);
if(getstr(str,60,0))
if(getstr(str,60,K_TRIM))
printfile(str,0);
return(0);
case CS_EDIT_TEXT_FILE: /* Edit ASCII/Ctrl-A file */
if(!chksyspass())
return(0);
bputs(text[Filename]);
if(getstr(str,60,0))
if(getstr(str,60,K_TRIM))
editfile(str);
return(0);
case CS_GURU_LOG:
......
......@@ -276,7 +276,7 @@ bool sbbs_t::upload(uint dirnum)
f.dir=curdirnum=dirnum;
bputs(text[Filename]);
if(getstr(fname, sizeof(fname) - 1, 0) < 1 || !checkfname(fname)) {
if(getstr(fname, sizeof(fname) - 1, K_TRIM) < 1 || !checkfname(fname)) {
if(fname[0])
bprintf(text[BadFilename], fname);
return(false);
......@@ -336,6 +336,10 @@ bool sbbs_t::upload(uint dirnum)
if(!dir_op(dirnum))
return(false); /* File is in database for another dir */
}
if(msgabort(true)) {
bputs(text[SearchedForDupes]);
return false;
}
}
}
bputs(text[SearchedForDupes]);
......
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