We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2a8371 commit b9c113aCopy full SHA for b9c113a
src/util/system.cpp
@@ -443,14 +443,18 @@ const fs::path& ArgsManager::GetDataDir(bool net_specific) const
443
} else {
444
path = GetDefaultDataDir();
445
}
446
- if (net_specific)
447
- path /= fs::PathFromString(BaseParams().DataDir());
448
449
- if (fs::create_directories(path)) {
450
- // This is the first run, create wallets subdirectory too
+ if (!fs::exists(path)) {
451
fs::create_directories(path / "wallets");
452
453
+ if (net_specific && !BaseParams().DataDir().empty()) {
+ path /= fs::PathFromString(BaseParams().DataDir());
454
+ fs::create_directories(path / "wallets");
455
+ }
456
457
+
458
path = StripRedundantLastElementsOfPath(path);
459
return path;
460
0 commit comments