mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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.
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user