diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2017-10-12 22:04:46 +1300 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2017-11-18 00:50:59 +1300 |
commit | 8263f6a5ac3f3af102a2819b7e179b00db7e0437 (patch) | |
tree | 2d08c4f8eeed52a2c1101d0fe1c16556d6da2b73 /src/util.cpp | |
parent | 9587a9c12b5d54263787a23c75f570db368318c1 (diff) |
Create walletdir if datadir doesn't exist and fix tests
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp index b87dd091be..d58f39e969 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; } |