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

Call clearline() after displaying "working strings" for file processors

Testable File Types and Download Events support working strings (display before/while the command-line executes). Clear the current line (displaying this working string) when the execution completes.
parent 099c5fa5
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2651 passed
...@@ -361,7 +361,7 @@ BOOL sbbs_t::start_batch_download() ...@@ -361,7 +361,7 @@ BOOL sbbs_t::start_batch_download()
continue; continue;
bputs(cfg.dlevent[j]->workstr); bputs(cfg.dlevent[j]->workstr);
external(cmdstr(cfg.dlevent[j]->cmd,path,nulstr,NULL),EX_OUTL); external(cmdstr(cfg.dlevent[j]->cmd,path,nulstr,NULL),EX_OUTL);
CRLF; clearline();
} }
} }
#endif #endif
......
...@@ -1026,7 +1026,7 @@ int sbbs_t::listfileinfo(uint dirnum, const char *filespec, long mode) ...@@ -1026,7 +1026,7 @@ int sbbs_t::listfileinfo(uint dirnum, const char *filespec, long mode)
bputs(cfg.dlevent[j]->workstr); bputs(cfg.dlevent[j]->workstr);
external(cmdstr(cfg.dlevent[j]->cmd,path,nulstr,NULL) external(cmdstr(cfg.dlevent[j]->cmd,path,nulstr,NULL)
,EX_OUTL); ,EX_OUTL);
CRLF; clearline();
} }
} }
} }
......
...@@ -71,15 +71,14 @@ bool sbbs_t::uploadfile(file_t* f) ...@@ -71,15 +71,14 @@ bool sbbs_t::uploadfile(file_t* f)
fprintf(stream, "%s", f->desc); fprintf(stream, "%s", f->desc);
fclose(stream); fclose(stream);
} }
if(external(cmdstr(cfg.ftest[i]->cmd,path,f->desc,NULL),EX_OFFLINE)) { int result = external(cmdstr(cfg.ftest[i]->cmd,path,f->desc,NULL),EX_OFFLINE);
safe_snprintf(str,sizeof(str),"attempted to upload %s to %s %s (%s Errors)" clearline();
if(result != 0) {
safe_snprintf(str,sizeof(str),"attempted to upload %s to %s %s (%s error code %d)"
,f->name ,f->name
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext); ,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext
,result);
logline(LOG_NOTICE,"U!",str); logline(LOG_NOTICE,"U!",str);
#if 0
sprintf(str,"Failed test: %s", cmdstr(cfg.ftest[i]->cmd,path,f->desc,NULL));
logline(" ",str);
#endif
bprintf(text[FileHadErrors],f->name,cfg.ftest[i]->ext); bprintf(text[FileHadErrors],f->name,cfg.ftest[i]->ext);
if(!SYSOP || yesno(text[DeleteFileQ])) if(!SYSOP || yesno(text[DeleteFileQ]))
remove(path); remove(path);
...@@ -106,7 +105,6 @@ bool sbbs_t::uploadfile(file_t* f) ...@@ -106,7 +105,6 @@ bool sbbs_t::uploadfile(file_t* f)
} }
fclose(stream); fclose(stream);
} }
CRLF;
#endif #endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment