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 authored and random-zebra committed Apr 19, 2021
1 parent 459c4ad commit a3438a2
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 @@ -528,6 +528,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()));
}
}

fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
Expand Down

0 comments on commit a3438a2

Please sign in to comment.