Skip to content
Snippets Groups Projects
Commit 1b6d8415 authored by deuce's avatar deuce
Browse files

Use fexistcase() rather than fexist() so uploads of lower-case filenames

(That STILL have to be 8.3) work.
parent ee5cc7ec
No related branches found
No related tags found
No related merge requests found
...@@ -64,9 +64,9 @@ bool sbbs_t::uploadfile(file_t *f) ...@@ -64,9 +64,9 @@ bool sbbs_t::uploadfile(file_t *f)
? cfg.altpath[f->altpath-1] ? cfg.altpath[f->altpath-1]
: cfg.dir[f->dir]->path,unpadfname(f->name,fname)); : cfg.dir[f->dir]->path,unpadfname(f->name,fname));
sprintf(tmp,"%s%s",cfg.temp_dir,fname); sprintf(tmp,"%s%s",cfg.temp_dir,fname);
if(!fexist(path) && fexist(tmp)) if(!fexistcase(path) && fexistcase(tmp))
mv(tmp,path,0); mv(tmp,path,0);
if(!fexist(path)) { if(!fexistcase(path)) {
bprintf(text[FileNotReceived],f->name); bprintf(text[FileNotReceived],f->name);
sprintf(str,"%s attempted to upload %s to %s %s (Not received)" sprintf(str,"%s attempted to upload %s to %s %s (Not received)"
,useron.alias ,useron.alias
...@@ -291,7 +291,7 @@ bool sbbs_t::upload(uint dirnum) ...@@ -291,7 +291,7 @@ bool sbbs_t::upload(uint dirnum)
action=NODE_ULNG; action=NODE_ULNG;
padfname(fname,f.name); padfname(fname,f.name);
sprintf(str,"%s%s",path,fname); sprintf(str,"%s%s",path,fname);
if(fexist(str)) { /* File is on disk */ if(fexistcase(str)) { /* File is on disk */
if(!dir_op(dirnum) && online!=ON_LOCAL) { /* local users or sysops */ if(!dir_op(dirnum) && online!=ON_LOCAL) { /* local users or sysops */
bprintf(text[FileAlreadyThere],fname); bprintf(text[FileAlreadyThere],fname);
return(false); } return(false); }
...@@ -416,7 +416,7 @@ bool sbbs_t::upload(uint dirnum) ...@@ -416,7 +416,7 @@ bool sbbs_t::upload(uint dirnum)
if(mv(src,str,1)) if(mv(src,str,1))
return(false); return(false);
CRLF; } CRLF; }
if(fexist(str)) { /* File is on disk */ if(fexistcase(str)) { /* File is on disk */
if(!uploadfile(&f)) if(!uploadfile(&f))
return(false); } return(false); }
else { else {
......
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