Test datadir in conf file exists
This commit is contained in:
parent
91eeaa0335
commit
529b866759
1 changed files with 3 additions and 0 deletions
|
@ -639,6 +639,9 @@ void ArgsManager::ReadConfigFile(const std::string& confPath)
|
||||||
}
|
}
|
||||||
// If datadir is changed in .conf file:
|
// If datadir is changed in .conf file:
|
||||||
ClearDatadirCache();
|
ClearDatadirCache();
|
||||||
|
if (!fs::is_directory(GetDataDir(false))) {
|
||||||
|
throw std::runtime_error(strprintf("specified data directory \"%s\" does not exist.", gArgs.GetArg("-datadir", "").c_str()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
Loading…
Reference in a new issue