Skip to content
Snippets Groups Projects
Commit d9907cdc authored by rswindell's avatar rswindell
Browse files

Introduced new fexistcase() function to fix user-supplied (DOS) filename case.

parent 313c7c7f
No related branches found
No related tags found
No related merge requests found
...@@ -1714,12 +1714,15 @@ static void receive_thread(void* arg) ...@@ -1714,12 +1714,15 @@ static void receive_thread(void* arg)
break; break;
if(i<scfg.total_fextrs) { if(i<scfg.total_fextrs) {
sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir); sprintf(tmp,"%sFILE_ID.DIZ",scfg.temp_dir);
remove(tmp); if(fexistcase(tmp))
remove(tmp);
system(cmdstr(xfer.user,scfg.fextr[i]->cmd,fname,"FILE_ID.DIZ",cmd)); system(cmdstr(xfer.user,scfg.fextr[i]->cmd,fname,"FILE_ID.DIZ",cmd));
if(!fexist(tmp)) { if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir); sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp); if(fexistcase(tmp))
remove(tmp);
system(cmdstr(xfer.user,scfg.fextr[i]->cmd,fname,"DESC.SDI",cmd)); system(cmdstr(xfer.user,scfg.fextr[i]->cmd,fname,"DESC.SDI",cmd));
fexistcase(tmp); /* fixes filename case */
} }
if((file=nopen(tmp,O_RDONLY))!=-1) { if((file=nopen(tmp,O_RDONLY))!=-1) {
memset(ext,0,sizeof(ext)); memset(ext,0,sizeof(ext));
......
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