mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #285 from crowning-/v0.11.2.x
Create empty dash.conf during startup if it doesn't exist
This commit is contained in:
commit
c1ed3fb5fd
9
src/util.cpp
Normal file → Executable file
9
src/util.cpp
Normal file → Executable file
@ -1106,8 +1106,13 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
|
|||||||
map<string, vector<string> >& mapMultiSettingsRet)
|
map<string, vector<string> >& mapMultiSettingsRet)
|
||||||
{
|
{
|
||||||
boost::filesystem::ifstream streamConfig(GetConfigFile());
|
boost::filesystem::ifstream streamConfig(GetConfigFile());
|
||||||
if (!streamConfig.good())
|
if (!streamConfig.good()){
|
||||||
return; // No dash.conf file is OK
|
// Create empty dash.conf if it does not excist
|
||||||
|
FILE* configFile = fopen(GetConfigFile().string().c_str(), "a");
|
||||||
|
if (configFile != NULL)
|
||||||
|
fclose(configFile);
|
||||||
|
return; // Nothing to read, so just return
|
||||||
|
}
|
||||||
|
|
||||||
set<string> setOptions;
|
set<string> setOptions;
|
||||||
setOptions.insert("*");
|
setOptions.insert("*");
|
||||||
|
Loading…
Reference in New Issue
Block a user