client: remove <data_dir> option from cc_config.xml

This leads to confusion;
e.g. if you do "read config files" it will look for cc_config.xml
in the new directory, not find it, and set default options.
Also, log files end up in old directory.
Also, gui_rpc_auth.cfg will be in new directory,
and the Manager won't look there.
This commit is contained in:
David Anderson 2014-10-22 20:08:48 -07:00
parent ae6bd50378
commit bda8d7bc56
3 changed files with 0 additions and 32 deletions

View File

@ -248,7 +248,6 @@ void CC_CONFIG::show() {
// (It's separate so that we can write messages in it)
int CC_CONFIG::parse_options_client(XML_PARSER& xp) {
char path[MAXPATHLEN];
string s;
int n, retval;
@ -311,13 +310,6 @@ int CC_CONFIG::parse_options_client(XML_PARSER& xp) {
}
continue;
}
if (xp.parse_str("data_dir", path, sizeof(path))) {
if (chdir(path)) {
perror("chdir");
exit(1);
}
continue;
}
if (xp.parse_bool("disallow_attach", disallow_attach)) continue;
if (xp.parse_bool("dont_check_file_sizes", dont_check_file_sizes)) continue;
if (xp.parse_bool("dont_contact_ref_site", dont_contact_ref_site)) continue;
@ -525,19 +517,6 @@ int read_config_file(bool init, const char* fname) {
if (init) {
coprocs = cc_config.config_coprocs;
if (strlen(cc_config.data_dir)) {
#ifdef _WIN32
_chdir(cc_config.data_dir);
#else
if (chdir(cc_config.data_dir)) {
msg_printf(NULL, MSG_INFO,
"Couldn't change to directory specified in cc_config.xml: %s",
cc_config.data_dir
);
return ERR_OPENDIR;
}
#endif
}
} else {
select_proxy_info(); // in case added or removed proxy info
}

View File

@ -205,7 +205,6 @@ void CC_CONFIG::defaults() {
client_new_version_text = "";
client_version_check_url = "http://boinc.berkeley.edu/download.php?xml=1";
config_coprocs.clear();
data_dir[0] = 0;
disallow_attach = false;
dont_check_file_sizes = false;
dont_contact_ref_site = false;
@ -336,9 +335,6 @@ int CC_CONFIG::parse_options(XML_PARSER& xp) {
config_coprocs.add(c);
continue;
}
if (xp.parse_str("data_dir", data_dir, sizeof(data_dir))) {
continue;
}
if (xp.parse_bool("disallow_attach", disallow_attach)) continue;
if (xp.parse_bool("dont_check_file_sizes", dont_check_file_sizes)) continue;
if (xp.parse_bool("dont_contact_ref_site", dont_contact_ref_site)) continue;
@ -541,12 +537,6 @@ int CC_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(
" <disallow_attach>%d</disallow_attach>\n"
" <dont_check_file_sizes>%d</dont_check_file_sizes>\n"

View File

@ -146,7 +146,6 @@ struct CC_CONFIG {
std::string client_new_version_text;
std::string client_version_check_url;
COPROCS config_coprocs;
char data_dir[256];
bool disallow_attach;
bool dont_check_file_sizes;
bool dont_contact_ref_site;