mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Return absolute path early in AbsPathForConfigVal
This prevents premature GetDataDir() calls, e.g., when config file is not read yet.
This commit is contained in:
@@ -1202,6 +1202,9 @@ int64_t GetStartupTime()
|
||||
|
||||
fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
|
||||
{
|
||||
if (path.is_absolute()) {
|
||||
return path;
|
||||
}
|
||||
return fs::absolute(path, GetDataDir(net_specific));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user