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)
|
||||
{
|
||||
boost::filesystem::ifstream streamConfig(GetConfigFile());
|
||||
if (!streamConfig.good())
|
||||
return; // No dash.conf file is OK
|
||||
if (!streamConfig.good()){
|
||||
// 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;
|
||||
setOptions.insert("*");
|
||||
|
Loading…
Reference in New Issue
Block a user