diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-01-21 18:47:57 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-01-21 18:48:03 +0100 |
commit | 45952dab9d2f51bf8aa0e2761d6c9ff3bfc69d60 (patch) | |
tree | fe6cc0a0a8962967a2bb8e2800bac6f53c2f3c42 /src/util | |
parent | 11cbd4bb54af079674c5fc1f0c695c00c7e1e44a (diff) | |
parent | da9caa1cedd69702aea44cb44b2fd0a2d6d56916 (diff) |
Merge #20932: refactor: Replace fs::absolute calls with AbsPathJoin calls
da9caa1cedd69702aea44cb44b2fd0a2d6d56916 Replace fs::absolute calls with AbsPathJoin calls (Kiminuo)
66576c4fd532ac18b8b355ea93d25581a2c15654 test: Clear forced -walletdir setting after wallet init_tests (Kiminuo)
Pull request description:
This adds better test coverage and will make it easier in #20744 to remove our dependency on the two-argument boost::filesystem::absolute() function which does not have a direct equivalent in C++17.
This PR doesn't change behavior aside from adding an assert and fixing a test bug.
ACKs for top commit:
jonatack:
Code review ACK da9caa1cedd69702aea44cb44b2fd0a2d6d56916 only doxygen improvements since my last review per `git diff d867d7a da9caa1`
MarcoFalke:
review ACK da9caa1cedd69702aea44cb44b2fd0a2d6d56916 📯
ryanofsky:
Code review ACK da9caa1cedd69702aea44cb44b2fd0a2d6d56916. Just comment and test tweaks since previous review.
Tree-SHA512: c940ee60f3ba374d4927cf34cf12d27c4c735c94af591fbc0ca408c641b30f8f8fbcfe521d66bfbddf9877a1fc8cd99bd8a47ebcd2fa59789de6bd87a7b9cf4d
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/system.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 917d37ccc7..d1fb921642 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -398,7 +398,7 @@ bool ArgsManager::GetSettingsPath(fs::path* filepath, bool temp) const } if (filepath) { std::string settings = GetArg("-settings", BITCOIN_SETTINGS_FILENAME); - *filepath = fs::absolute(temp ? settings + ".tmp" : settings, GetDataDir(/* net_specific= */ true)); + *filepath = fsbridge::AbsPathJoin(GetDataDir(/* net_specific= */ true), temp ? settings + ".tmp" : settings); } return true; } @@ -1311,7 +1311,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific) if (path.is_absolute()) { return path; } - return fs::absolute(path, GetDataDir(net_specific)); + return fsbridge::AbsPathJoin(GetDataDir(net_specific), path); } void ScheduleBatchPriority() |