Turn TryCreateDirectory() into TryCreateDirectories()

Use case: TryCreateDirectory(GetDataDir() / "blocks" / "index") would
fail if the blocks directory was not explicitly created before.

The line that did so was in a weird location and could be removed as a
result.
This commit is contained in:
Marko Bencun
2017-02-22 18:10:00 +09:00
parent a4ca0b0423
commit 1d1ea9f096
6 changed files with 8 additions and 10 deletions

View File

@@ -1410,8 +1410,6 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
fReindex = GetBoolArg("-reindex", false);
bool fReindexChainState = GetBoolArg("-reindex-chainstate", false);
fs::create_directories(GetDataDir() / "blocks");
// cache size calculations
int64_t nTotalCache = (GetArg("-dbcache", nDefaultDbCache) << 20);
nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache