mirror of https://github.com/BOINC/boinc.git
file_deleter logs strerror(errno) if unable to remove a result file.
svn path=/trunk/boinc/; revision=4677
This commit is contained in:
parent
64886ead77
commit
df0f066a69
|
@ -20324,6 +20324,7 @@ Bruce 2004-11-29
|
|||
to the file deleter. This are useful to implement <no_delete/>
|
||||
for all input or output files respectively.
|
||||
- Documented <no_delete/> file tag.
|
||||
- file_deleter logs strerror(errno) if unable to remove a result file.
|
||||
sched/
|
||||
file_deleter.C
|
||||
doc/
|
||||
|
|
|
@ -26,6 +26,7 @@ static volatile const char *BOINCrcsid="$Id$";
|
|||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "boinc_db.h"
|
||||
#include "parse.h"
|
||||
|
@ -111,8 +112,8 @@ int result_delete_files(RESULT& result) {
|
|||
retval = unlink(pathname);
|
||||
++count_deleted;
|
||||
log_messages.printf(SCHED_MSG_LOG::NORMAL,
|
||||
"[%s] unlinked %s; retval %d\n",
|
||||
result.name, filename, retval
|
||||
"[%s] unlinked %s; retval %d %s\n",
|
||||
result.name, filename, retval, (retval && errno)?strerror(errno):""
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue