Fix datadir handling in bitcoin-cli
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:
parent
b28dada374
commit
7e33a18a34
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ static int AppInitRPC(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
if (!fs::is_directory(GetDataDir(false))) {
|
if (!CheckDataDirOption()) {
|
||||||
tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", "").c_str());
|
tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", "").c_str());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue