mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +02:00
Merge #20932: refactor: Replace fs::absolute calls with AbsPathJoin calls
da9caa1cedReplace fs::absolute calls with AbsPathJoin calls (Kiminuo)66576c4fd5test: 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 ACKda9caa1cedonly doxygen improvements since my last review per `git diff d867d7a da9caa1` MarcoFalke: review ACKda9caa1ced📯 ryanofsky: Code review ACKda9caa1ced. Just comment and test tweaks since previous review. Tree-SHA512: c940ee60f3ba374d4927cf34cf12d27c4c735c94af591fbc0ca408c641b30f8f8fbcfe521d66bfbddf9877a1fc8cd99bd8a47ebcd2fa59789de6bd87a7b9cf4d
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user