Commit 6189f004 authored by rswindell's avatar rswindell
Browse files

Logs upload test failure before asking sysop to delete file or not.

parent 90b0bdac
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -100,16 +100,18 @@ bool sbbs_t::uploadfile(file_t *f)
fclose(stream);
}
if(external(cmdstr(cfg.ftest[i]->cmd,path,f->desc,NULL),EX_OFFLINE)) {
bprintf(text[FileHadErrors],f->name,cfg.ftest[i]->ext);
if(SYSOP) {
if(!yesno(text[DeleteFileQ])) return(0);
}
remove(path);
sprintf(str,"%s attempted to upload %s to %s %s (%s Errors)"
,useron.alias
,f->name
,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext);
logline("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);
if(!SYSOP || yesno(text[DeleteFileQ]))
remove(path);
return(0);
} else {
sprintf(str,"%ssbbsfile.nam",cfg.node_dir);
......
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