Skip to content

Commit

Permalink
Test datadir in conf file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
meshcollider committed Dec 5, 2017
1 parent 91eeaa0 commit 529b866
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ void ArgsManager::ReadConfigFile(const std::string& confPath)
}
// If datadir is changed in .conf file:
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
Expand Down

0 comments on commit 529b866

Please sign in to comment.