Use CheckDataDirOption() for code uniformity

All other clients and tools use CheckDataDirOption() rather
fs::is_directory(GetDataDir(false)) for the first datadir check.
This commit is contained in:
Hennadii Stepanov 2019-07-24 18:54:52 +03:00
parent 7e33a18a34
commit 66f5c17f8a
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -55,7 +55,7 @@ static bool WalletAppInit(int argc, char* argv[])
// check for printtoconsole, allow -debug
LogInstance().m_print_to_console = gArgs.GetBoolArg("-printtoconsole", gArgs.GetBoolArg("-debug", false));
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());
return false;
}