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/>
|
to the file deleter. This are useful to implement <no_delete/>
|
||||||
for all input or output files respectively.
|
for all input or output files respectively.
|
||||||
- Documented <no_delete/> file tag.
|
- Documented <no_delete/> file tag.
|
||||||
|
- file_deleter logs strerror(errno) if unable to remove a result file.
|
||||||
sched/
|
sched/
|
||||||
file_deleter.C
|
file_deleter.C
|
||||||
doc/
|
doc/
|
||||||
|
|
|
@ -26,6 +26,7 @@ static volatile const char *BOINCrcsid="$Id$";
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#include "boinc_db.h"
|
#include "boinc_db.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
|
@ -111,8 +112,8 @@ int result_delete_files(RESULT& result) {
|
||||||
retval = unlink(pathname);
|
retval = unlink(pathname);
|
||||||
++count_deleted;
|
++count_deleted;
|
||||||
log_messages.printf(SCHED_MSG_LOG::NORMAL,
|
log_messages.printf(SCHED_MSG_LOG::NORMAL,
|
||||||
"[%s] unlinked %s; retval %d\n",
|
"[%s] unlinked %s; retval %d %s\n",
|
||||||
result.name, filename, retval
|
result.name, filename, retval, (retval && errno)?strerror(errno):""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue