Throw error if -paramsdir not a valid directory

This commit is contained in:
elbandi 2020-06-05 20:36:38 +02:00
parent beae52ef9b
commit 1bd4d236d4
1 changed files with 1 additions and 2 deletions

View File

@ -549,8 +549,7 @@ const boost::filesystem::path &ZC_GetParamsDir()
if (mapArgs.count("-paramsdir")) {
path = fs::system_complete(mapArgs["-paramsdir"]);
if (!fs::is_directory(path)) {
path = "";
return path;
throw std::runtime_error(strprintf("The -paramsdir '%s' does not exist or is not a directory", path.string()));
}
} else {
path = ZC_GetDefaultBaseParamsDir();