aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2017-12-06 00:24:06 +1300
committerMeshCollider <dobsonsa68@gmail.com>2017-12-06 00:24:06 +1300
commit529b8667599ad74f6dae639b889d22e907353070 (patch)
treef7817d8773754e12385a979bff752cfe6ee66598 /src/util.cpp
parent91eeaa03354bbb4ee79d6defaffaef2b32ecbe29 (diff)
Test datadir in conf file exists
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp3
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