aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-24 03:29:40 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-07-24 18:45:02 +0300
commit50824093bb2d68fe1393dfd636fab5f8795faa5d (patch)
tree59774405d432cfa43c7072f4dfb9c44874841c18 /src/util
parent740d41ce9f7fdf209366e930bd0fdcc6b1bc6b79 (diff)
Fix datadir handling in bitcoind
This prevents premature tries to access or create the default datadir. This is useful when the -datadir option is specified and the default datadir is unreachable.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/system.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}