From 595ca090810849037902fabd6abd87e99b91dafe Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 9 Dec 2019 08:15:18 -0800 Subject: [PATCH] Fix lack of block dir bug --- src/init.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index 873e31f40..7e27fedac 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1670,6 +1670,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);