diff --git a/src/init.cpp b/src/init.cpp index 58761d716..12783153f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1621,7 +1621,7 @@ bool AppInitMain() if (fReindex) { // remove old LevelDB indexes boost::system::error_code ec; - fs::remove_all(GetDataDir() / "blocks" / "index", ec); + fs::remove_all(GetBlocksDir() / "index", ec); fs::remove_all(GetDataDir() / "chainstate", ec); fs::remove_all(GetDataDir() / "claimtrie", ec); } diff --git a/src/validation.cpp b/src/validation.cpp index 2ead2162f..726b55607 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4362,7 +4362,7 @@ bool LoadBlockIndex(const CChainParams& chainparams) needs_init = g_chainstate.mapBlockIndex.empty(); if (needs_init) { - auto blockDir = GetDataDir() / "blocks"; + auto& blockDir = GetBlocksDir(); for (auto it: fs::directory_iterator(blockDir)) { boost::system::error_code ec; if (fs::file_size(it, ec) > 100000000) {