diff options
| author | Hennadii Stepanov <[email protected]> | 2019-07-24 03:29:40 +0300 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2019-07-24 18:45:02 +0300 |
| commit | 50824093bb2d68fe1393dfd636fab5f8795faa5d (patch) | |
| tree | 59774405d432cfa43c7072f4dfb9c44874841c18 /src/bitcoind.cpp | |
| parent | Add CheckDataDirOption() function (diff) | |
| download | discoin-50824093bb2d68fe1393dfd636fab5f8795faa5d.tar.xz discoin-50824093bb2d68fe1393dfd636fab5f8795faa5d.zip | |
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/bitcoind.cpp')
| -rw-r--r-- | src/bitcoind.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 77367d6bb..4037f6856 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)) { |