aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bitcoind.cpp3
-rw-r--r--src/util/system.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 77367d6bb8..4037f6856d 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -92,8 +92,7 @@ static bool AppInit(int argc, char* argv[])
try
{
- if (!fs::is_directory(GetDataDir(false)))
- {
+ if (!CheckDataDirOption()) {
return InitError(strprintf("Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", "")));
}
if (!gArgs.ReadConfigFiles(error, true)) {
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 520ed35504..4d8aa9ed90 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -941,7 +941,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
// If datadir is changed in .conf file:
ClearDatadirCache();
- if (!fs::is_directory(GetDataDir(false))) {
+ if (!CheckDataDirOption()) {
error = strprintf("specified data directory \"%s\" does not exist.", gArgs.GetArg("-datadir", "").c_str());
return false;
}