From df0f066a6983c8b999eae8942be0b7162c3bb805 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Mon, 29 Nov 2004 09:47:48 +0000 Subject: [PATCH] file_deleter logs strerror(errno) if unable to remove a result file. svn path=/trunk/boinc/; revision=4677 --- checkin_notes | 1 + sched/file_deleter.C | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index cc3c72bc14..ad0a5adc62 100755 --- a/checkin_notes +++ b/checkin_notes @@ -20324,6 +20324,7 @@ Bruce 2004-11-29 to the file deleter. This are useful to implement for all input or output files respectively. - Documented file tag. + - file_deleter logs strerror(errno) if unable to remove a result file. sched/ file_deleter.C doc/ diff --git a/sched/file_deleter.C b/sched/file_deleter.C index 7ae3dd0a99..10678a18c6 100644 --- a/sched/file_deleter.C +++ b/sched/file_deleter.C @@ -26,6 +26,7 @@ static volatile const char *BOINCrcsid="$Id$"; #include #include #include +#include #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):"" ); } }