|
|
@ -870,7 +870,11 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
|
|
|
|
LOCK(csPathCached);
|
|
|
|
LOCK(csPathCached);
|
|
|
|
|
|
|
|
|
|
|
|
if (mapArgs.count("-datadir")) {
|
|
|
|
if (mapArgs.count("-datadir")) {
|
|
|
|
path = mapArgs["-datadir"];
|
|
|
|
path = fs::system_complete(mapArgs["-datadir"]);
|
|
|
|
|
|
|
|
if (!fs::is_directory(path)) {
|
|
|
|
|
|
|
|
path = "";
|
|
|
|
|
|
|
|
return path;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
path = GetDefaultDataDir();
|
|
|
|
path = GetDefaultDataDir();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -892,7 +896,7 @@ boost::filesystem::path GetConfigFile()
|
|
|
|
return pathConfigFile;
|
|
|
|
return pathConfigFile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool ReadConfigFile(map<string, string>& mapSettingsRet,
|
|
|
|
void ReadConfigFile(map<string, string>& mapSettingsRet,
|
|
|
|
map<string, vector<string> >& mapMultiSettingsRet)
|
|
|
|
map<string, vector<string> >& mapMultiSettingsRet)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
namespace fs = boost::filesystem;
|
|
|
|
namespace fs = boost::filesystem;
|
|
|
@ -900,7 +904,7 @@ bool ReadConfigFile(map<string, string>& mapSettingsRet,
|
|
|
|
|
|
|
|
|
|
|
|
fs::ifstream streamConfig(GetConfigFile());
|
|
|
|
fs::ifstream streamConfig(GetConfigFile());
|
|
|
|
if (!streamConfig.good())
|
|
|
|
if (!streamConfig.good())
|
|
|
|
return true; // No bitcoin.conf file is OK
|
|
|
|
return; // No bitcoin.conf file is OK
|
|
|
|
|
|
|
|
|
|
|
|
set<string> setOptions;
|
|
|
|
set<string> setOptions;
|
|
|
|
setOptions.insert("*");
|
|
|
|
setOptions.insert("*");
|
|
|
@ -917,7 +921,6 @@ bool ReadConfigFile(map<string, string>& mapSettingsRet,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mapMultiSettingsRet[strKey].push_back(it->value[0]);
|
|
|
|
mapMultiSettingsRet[strKey].push_back(it->value[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
boost::filesystem::path GetPidFile()
|
|
|
|
boost::filesystem::path GetPidFile()
|
|
|
|