Skip to content
Snippets Groups Projects
Commit e63a96c7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Removing files via batch flag prompt, don't try to remove cdt for free files

parent 303d0db9
No related branches found
No related tags found
No related merge requests found
...@@ -463,7 +463,8 @@ bool sbbs_t::listfile(file_t* f, const int dirnum, const char *search, const ch ...@@ -463,7 +463,8 @@ bool sbbs_t::listfile(file_t* f, const int dirnum, const char *search, const ch
int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total
,const int totalfiles) ,const int totalfiles)
{ {
char ch,str[256],*p,remcdt=0,remfile=0; char ch,str[256],*p;
bool remcdt,remfile;
int c, d; int c, d;
char path[MAX_PATH + 1]; char path[MAX_PATH + 1];
int i,j; int i,j;
...@@ -641,8 +642,8 @@ int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total ...@@ -641,8 +642,8 @@ int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total
if(ch=='R') { if(ch=='R') {
if(noyes(text[RemoveFileQ])) if(noyes(text[RemoveFileQ]))
return(2); return(2);
remcdt = TRUE; remcdt = true;
remfile = TRUE; remfile = true;
if(dir_op(smb->dirnum)) { if(dir_op(smb->dirnum)) {
remfile=!noyes(text[DeleteFileQ]); remfile=!noyes(text[DeleteFileQ]);
remcdt=!noyes(text[RemoveCreditsQ]); remcdt=!noyes(text[RemoveCreditsQ]);
...@@ -688,7 +689,7 @@ int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total ...@@ -688,7 +689,7 @@ int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total
if(remove(getfilepath(&cfg, bf[i], path)) != 0) if(remove(getfilepath(&cfg, bf[i], path)) != 0)
errormsg(WHERE, ERR_REMOVE, path); errormsg(WHERE, ERR_REMOVE, path);
} }
if(remcdt) if(bf[i]->cost > 0 && remcdt)
removefcdt(bf[i]); removefcdt(bf[i]);
} }
} }
...@@ -708,7 +709,7 @@ int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total ...@@ -708,7 +709,7 @@ int sbbs_t::batchflagprompt(smb_t* smb, file_t** bf, uint* row, const int total
if(remove(getfilepath(&cfg, f, path)) != 0 && fexist(path)) if(remove(getfilepath(&cfg, f, path)) != 0 && fexist(path))
errormsg(WHERE, ERR_REMOVE, path); errormsg(WHERE, ERR_REMOVE, path);
} }
if(remcdt) if(f->cost > 0 && remcdt)
removefcdt(f); removefcdt(f);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment