Fix lack of block dir bug

This commit is contained in:
Jonathan "Duke" Leto
2019-12-09 08:15:18 -08:00
parent 5b71bda7a1
commit d9ad155c2b

View File

@@ -1666,6 +1666,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fReindex = GetBoolArg("-reindex", false);
boost::filesystem::path blocksDir = GetDataDir() / "blocks";
if (!boost::filesystem::exists(blocksDir))
{
boost::filesystem::create_directories(blocksDir);
}
// block tree db settings
int dbMaxOpenFiles = GetArg("-dbmaxopenfiles", DEFAULT_DB_MAX_OPEN_FILES);
bool dbCompression = GetBoolArg("-dbcompression", DEFAULT_DB_COMPRESSION);