diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2017-12-06 00:24:06 +1300 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2017-12-06 00:24:06 +1300 |
commit | 529b8667599ad74f6dae639b889d22e907353070 (patch) | |
tree | f7817d8773754e12385a979bff752cfe6ee66598 /src/util.cpp | |
parent | 91eeaa03354bbb4ee79d6defaffaef2b32ecbe29 (diff) |
Test datadir in conf file exists
Diffstat (limited to 'src/util.cpp')
-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 |