mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02: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:
parent
740d41ce9f
commit
50824093bb
2 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue