mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Replace fs::absolute calls with AbsPathJoin calls
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 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