From bda8d7bc565aa533ebbb3604e9bb3261f5c65c76 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 22 Oct 2014 20:08:48 -0700 Subject: [PATCH] client: remove 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. --- client/log_flags.cpp | 21 --------------------- lib/cc_config.cpp | 10 ---------- lib/cc_config.h | 1 - 3 files changed, 32 deletions(-) diff --git a/client/log_flags.cpp b/client/log_flags.cpp index 5d5f1bfc56..223176ea2b 100644 --- a/client/log_flags.cpp +++ b/client/log_flags.cpp @@ -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 } diff --git a/lib/cc_config.cpp b/lib/cc_config.cpp index fc88f5089e..2aa644d3e5 100644 --- a/lib/cc_config.cpp +++ b/lib/cc_config.cpp @@ -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(" %s\n", data_dir); - } - out.printf( " %d\n" " %d\n" diff --git a/lib/cc_config.h b/lib/cc_config.h index 5e1e4bad75..be8406c9e4 100644 --- a/lib/cc_config.h +++ b/lib/cc_config.h @@ -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;