From 028d4d9a36a002266e8697b931c588c1f99985f1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 17 Jul 2012 21:45:19 +0000 Subject: [PATCH] - client: delete sticky files when reset project svn path=/trunk/boinc/; revision=25878 --- checkin_notes | 6 ++++++ client/client_state.cpp | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1108977c42..9e6b384523 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4979,3 +4979,9 @@ David 17 July 2012 api/ boinc_api.h + +David 17 July 2012 + - client: delete sticky files when reset project + + client/ + client_state.cpp diff --git a/client/client_state.cpp b/client/client_state.cpp index cdb34f746b..9911fad70f 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -1726,12 +1726,11 @@ int CLIENT_STATE::report_result_error(RESULT& res, const char* format, ...) { // - stop all active tasks // - stop all file transfers // - stop scheduler RPC if any -// - delete all workunits and results -// - delete all apps and app_versions +// - delete workunits and results +// - delete apps and app_versions // - garbage collect to delete unneeded files -// - clear debts and backoffs +// - clear backoffs // -// Note: does NOT delete persistent files or user-supplied files; // does not delete project dir // int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) { @@ -1784,6 +1783,15 @@ int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) { project->user_files.clear(); project->project_files.clear(); + // clear flags so that sticky files get deleted + // + for (i=0; iproject == project) { + fip->sticky = false; + } + } + garbage_collect_always(); // remove apps and app_versions (but not if anonymous platform)