- client: when launching app, delete init_data.xml using switcher

prior to trying to write it,
    in case it's owned by another user (e.g., boinc_project)

svn path=/trunk/boinc/; revision=20267
This commit is contained in:
David Anderson 2010-01-26 00:21:57 +00:00
parent 509b3b5896
commit b7a07f87a7
2 changed files with 13 additions and 0 deletions

View File

@ -659,3 +659,11 @@ David 25 Jan 2010
sched/
transitioner.cpp
David 25 Jan 2010
- client: when launching app, delete init_data.xml using switcher
prior to trying to write it,
in case it's owned by another user (e.g., boinc_project)
client/
app_start.cpp

View File

@ -234,6 +234,11 @@ int ACTIVE_TASK::write_app_init_file() {
aid.starting_elapsed_time = checkpoint_elapsed_time;
sprintf(init_data_path, "%s/%s", slot_dir, INIT_DATA_FILE);
// delete the file using the switcher (Unix)
// in case it's owned by another user and we don't have write access
//
delete_project_owned_file(init_data_path, false);
f = boinc_fopen(init_data_path, "w");
if (!f) {
msg_printf(wup->project, MSG_INTERNAL_ERROR,