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 832ebbb0 authored by rswindell's avatar rswindell
Browse files

Bugfix: testable and viewable file extensions are supposed to be case

insensitive.
parent adf3d381
......@@ -323,7 +323,7 @@ void sbbs_t::extract(uint dirnum)
strcpy(str,f.name);
truncsp(str);
for(i=0;i<cfg.total_fextrs;i++)
if(!strcmp(str+9,cfg.fextr[i]->ext) && chk_ar(cfg.fextr[i]->ar,&useron)) {
if(!stricmp(str+9,cfg.fextr[i]->ext) && chk_ar(cfg.fextr[i]->ar,&useron)) {
strcpy(excmd,cfg.fextr[i]->cmd);
break; }
if(i==cfg.total_fextrs) {
......
......@@ -79,7 +79,7 @@ bool sbbs_t::uploadfile(file_t *f)
strcpy(tmp,f->name);
truncsp(tmp);
for(i=0;i<cfg.total_ftests;i++)
if(cfg.ftest[i]->ext[0]=='*' || !strcmp(tmp+9,cfg.ftest[i]->ext)) {
if(cfg.ftest[i]->ext[0]=='*' || !stricmp(tmp+9,cfg.ftest[i]->ext)) {
if(!chk_ar(cfg.ftest[i]->ar,&useron))
continue;
attr(LIGHTGRAY);
......@@ -333,7 +333,7 @@ bool sbbs_t::upload(uint dirnum)
if(p!=NULL)
*p=0;
ch=strlen(str+i);
if(!strcmp(tmp+9,str+i))
if(!stricmp(tmp+9,str+i))
break;
}
if(j && i>=j) {
......
......@@ -95,7 +95,7 @@ void sbbs_t::viewfiles(uint dirnum, char *fspec)
padfname(fspec,tmp);
truncsp(tmp);
for(i=0;i<cfg.total_fviews;i++)
if(!strcmp(tmp+9,cfg.fview[i]->ext) && chk_ar(cfg.fview[i]->ar,&useron)) {
if(!stricmp(tmp+9,cfg.fview[i]->ext) && chk_ar(cfg.fview[i]->ar,&useron)) {
strcpy(viewcmd,cfg.fview[i]->cmd);
break; }
if(i==cfg.total_fviews) {
......
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