diff options
-rw-r--r-- | src/util.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 6631c236f1..1aa18c73b3 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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 |