mirror of https://github.com/BOINC/boinc.git
- client: delete sticky files when reset project
svn path=/trunk/boinc/; revision=25878
This commit is contained in:
parent
aedbf28981
commit
028d4d9a36
|
@ -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
|
||||
|
|
|
@ -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; i<file_infos.size(); i++) {
|
||||
FILE_INFO* fip = file_infos[i];
|
||||
if (fip->project == project) {
|
||||
fip->sticky = false;
|
||||
}
|
||||
}
|
||||
|
||||
garbage_collect_always();
|
||||
|
||||
// remove apps and app_versions (but not if anonymous platform)
|
||||
|
|
Loading…
Reference in New Issue