diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-22 14:55:38 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-24 10:29:55 +0200 |
commit | 0f53df47d5b8319fc71f3b87c15a115ff797fb50 (patch) | |
tree | efa12325b165fe5f85bb926c69001e98cb0d45b9 /src/util/system.cpp | |
parent | 716de29dd8672d28bfe0a08424e9958fe61054d2 (diff) |
Add `ArgsManager.GetDataDirBase()` and `ArgsManager.GetDataDirNet()` as an intended replacement for `ArgsManager.GetDataDirPath(net_identifier)`
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r-- | src/util/system.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 06684c78ad..3613d780ca 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -404,7 +404,7 @@ const fs::path& ArgsManager::GetBlocksDirPath() const return path; } } else { - path = GetDataDirPath(false); + path = GetDataDirBase(); } path /= BaseParams().DataDir(); @@ -513,7 +513,7 @@ bool ArgsManager::GetSettingsPath(fs::path* filepath, bool temp) const } if (filepath) { std::string settings = GetArg("-settings", BITCOIN_SETTINGS_FILENAME); - *filepath = fsbridge::AbsPathJoin(GetDataDirPath(/* net_specific= */ true), temp ? settings + ".tmp" : settings); + *filepath = fsbridge::AbsPathJoin(GetDataDirNet(), temp ? settings + ".tmp" : settings); } return true; } @@ -804,7 +804,7 @@ fs::path GetDefaultDataDir() const fs::path &GetDataDir(bool fNetSpecific) { - return gArgs.GetDataDirPath(fNetSpecific); + return fNetSpecific ? gArgs.GetDataDirNet() : gArgs.GetDataDirBase(); } bool CheckDataDirOption() @@ -1361,7 +1361,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific) if (path.is_absolute()) { return path; } - return fsbridge::AbsPathJoin(GetDataDir(net_specific), path); + return fsbridge::AbsPathJoin(net_specific ? gArgs.GetDataDirNet() : gArgs.GetDataDirBase(), path); } void ScheduleBatchPriority() |