aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
authorKiminuo <kiminuo@protonmail.com>2021-01-13 15:44:40 +0100
committerKiminuo <kiminuo@protonmail.com>2021-01-15 22:48:15 +0100
commitda9caa1cedd69702aea44cb44b2fd0a2d6d56916 (patch)
treefc2198dea8c7c5f0cd91b7df259afd1a4c90efd7 /src/util/system.cpp
parent66576c4fd532ac18b8b355ea93d25581a2c15654 (diff)
downloadbitcoin-da9caa1cedd69702aea44cb44b2fd0a2d6d56916.tar.xz
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.
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r--src/util/system.cpp4
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()