Skip to content

Commit

Permalink
Throw error if -paramsdir not a valid directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbandi committed Aug 7, 2020
1 parent beae52e commit 1bd4d23
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1bd4d23

Please sign in to comment.