Clean windows whitespace

svn:r2266
This commit is contained in:
Nick Mathewson 2004-08-18 03:47:55 +00:00
parent 17ce7d499f
commit 8626c7724e

View File

@ -588,7 +588,7 @@ static char *get_default_conf_file(void)
char *path = tor_malloc(MAX_PATH); char *path = tor_malloc(MAX_PATH);
if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, path, CSIDL_APPDATA, 1))) { if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, path, CSIDL_APPDATA, 1))) {
tor_free(path); tor_free(path);
return NULL; return NULL;
} }
strlcat(path,"\\tor\\torrc",MAX_PATH); strlcat(path,"\\tor\\torrc",MAX_PATH);
return path; return path;
@ -651,21 +651,21 @@ int getconfig(int argc, char **argv, or_options_t *options) {
using_default_torrc = 0; using_default_torrc = 0;
} else { } else {
/* didn't find one, try CONFDIR */ /* didn't find one, try CONFDIR */
char *fn; char *fn;
using_default_torrc = 1; using_default_torrc = 1;
fn = get_default_conf_file(); fn = get_default_conf_file();
if (fn && file_status(fn)==FN_FILE) { if (fn && file_status(fn)==FN_FILE) {
fname = fn; fname = fn;
} else { } else {
tor_free(fn); tor_free(fn);
fn = expand_filename("~/.torrc"); fn = expand_filename("~/.torrc");
if (fn && file_status(fn)==FN_FILE) { if (fn && file_status(fn)==FN_FILE) {
fname = fn; fname = fn;
} else { } else {
tor_free(fn); tor_free(fn);
fname = get_default_conf_file(); fname = get_default_conf_file();
} }
} }
} }
log(LOG_DEBUG,"Opening config file '%s'",fname); log(LOG_DEBUG,"Opening config file '%s'",fname);
@ -1040,13 +1040,13 @@ const char *get_data_directory(or_options_t *options) {
else if (server_mode()) { else if (server_mode()) {
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
char *p; char *p;
p = tor_malloc(MAX_PATH); p = tor_malloc(MAX_PATH);
if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, p, CSIDL_APPDATA, 1))) { if (!SUCCEEDED(SHGetSpecialFolderPath(NULL, p, CSIDL_APPDATA, 1))) {
strlcpy(p,CONFDIR, MAX_PATH); strlcpy(p,CONFDIR, MAX_PATH);
} }
strlcat(p,"\\tor",MAX_PATH); strlcat(p,"\\tor",MAX_PATH);
options->DataDirectory = p; options->DataDirectory = p;
return p; return p;
#else #else
d = "~/.tor"; d = "~/.tor";
#endif #endif