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

Use removecase() rather than remove() to delete stale description files.

-- Fixes bug reported by Jon Justvig (Thanks!)
parent a74ab3bd
Branches
Tags
No related merge requests found
...@@ -270,11 +270,11 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) ...@@ -270,11 +270,11 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip)
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); removecase(tmp);
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL)); system(mycmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL));
if(!fexistcase(tmp)) { if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir); sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp); removecase(tmp);
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL)); system(mycmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL));
fexistcase(tmp); fexistcase(tmp);
} }
...@@ -473,11 +473,11 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip) ...@@ -473,11 +473,11 @@ void addlist(char *inpath, file_t f, uint dskip, uint sskip)
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); removecase(tmp);
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL)); system(mycmdstr(scfg.fextr[i]->cmd,filepath,"FILE_ID.DIZ",NULL));
if(!fexistcase(tmp)) { if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir); sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp); removecase(tmp);
system(mycmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL)); system(mycmdstr(scfg.fextr[i]->cmd,filepath,"DESC.SDI",NULL));
fexistcase(tmp); fexistcase(tmp);
} }
...@@ -895,11 +895,11 @@ int main(int argc, char **argv) ...@@ -895,11 +895,11 @@ int main(int argc, char **argv)
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); removecase(tmp);
system(mycmdstr(scfg.fextr[i]->cmd,str,"FILE_ID.DIZ",NULL)); system(mycmdstr(scfg.fextr[i]->cmd,str,"FILE_ID.DIZ",NULL));
if(!fexistcase(tmp)) { if(!fexistcase(tmp)) {
sprintf(tmp,"%sDESC.SDI",scfg.temp_dir); sprintf(tmp,"%sDESC.SDI",scfg.temp_dir);
remove(tmp); removecase(tmp);
system(mycmdstr(scfg.fextr[i]->cmd,str,"DESC.SDI",NULL)); system(mycmdstr(scfg.fextr[i]->cmd,str,"DESC.SDI",NULL));
fexistcase(tmp); fexistcase(tmp);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment