From 8263f6a5ac3f3af102a2819b7e179b00db7e0437 Mon Sep 17 00:00:00 2001 From: MeshCollider Date: Thu, 12 Oct 2017 22:04:46 +1300 Subject: Create walletdir if datadir doesn't exist and fix tests --- src/util.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/util.cpp') diff --git a/src/util.cpp b/src/util.cpp index b87dd091b..d58f39e96 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -574,7 +574,10 @@ const fs::path &GetDataDir(bool fNetSpecific) if (fNetSpecific) path /= BaseParams().DataDir(); - fs::create_directories(path); + if (fs::create_directories(path)) { + // This is the first run, create wallets subdirectory too + fs::create_directories(path / "wallets"); + } return path; } -- cgit v1.2.3