lib: don't write <data_dir> to cc_config.xml if empty string, because older versions of BOINC choke

svn path=/trunk/boinc/; revision=23491
This commit is contained in:
Charlie Fenton 2011-05-02 05:00:03 +00:00
parent 64529f6ca3
commit d27633a516
2 changed files with 10 additions and 4 deletions

View File

@ -2729,7 +2729,10 @@ Charlie 29 Apr 2011
cc_config.cpp
Charlie 1 May 2011
- lib: initialize data_dir in CONFIG::defaults().
- lib: initialize data_dir in CONFIG::defaults(); don't write <data_dir> to
cc_config.xml if empty string, because older versions of BOINC choke.
lib/
cc_config.cpp
Charlie 1 May 2011

View File

@ -437,12 +437,15 @@ int CONFIG::write(MIOFILE& out, LOG_FLAGS& log_flags) {
);
}
// Older versions of BOINC choke on empty data_dir string
if (strlen(data_dir)) {
out.printf(" <data_dir>%s</data_dir>\n", data_dir);
}
out.printf(
" <data_dir>%s</data_dir>\n"
" <disallow_attach>%d</disallow_attach>\n"
" <dont_check_file_sizes>%d</dont_check_file_sizes>\n"
" <dont_contact_ref_site>%d</dont_contact_ref_site>\n",
data_dir,
disallow_attach,
dont_check_file_sizes,
dont_contact_ref_site