diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -118,6 +118,16 @@ return false; } + // Make sure we create the net-specific data directory early on: if it + // is new, this has a side effect of also creating + // //wallets/. + // + // TODO: this should be removed once GetDataDir() no longer creates the + // wallets/ subdirectory. + // See more info at: + // https://reviews.bitcoinabc.org/D3312 + GetDataDir(true); + // Error out when loose non-argument tokens are encountered on command // line for (int i = 1; i < argc; i++) { diff --git a/src/util.cpp b/src/util.cpp --- a/src/util.cpp +++ b/src/util.cpp @@ -806,6 +806,12 @@ if (fs::create_directories(path)) { // This is the first run, create wallets subdirectory too + // + // TODO: this is an ugly way to create the wallets/ directory and + // really shouldn't be done here. Once this is fixed, please + // also remove the corresponding line in bitcoind.cpp AppInit. + // See more info at: + // https://reviews.bitcoinabc.org/D3312 fs::create_directories(path / "wallets"); }