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:
parent
0626b8cbdf
commit
c1f325126c
1 changed files with 3 additions and 0 deletions
|
@ -1202,6 +1202,9 @@ int64_t GetStartupTime()
|
||||||
|
|
||||||
fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
|
fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
|
||||||
{
|
{
|
||||||
|
if (path.is_absolute()) {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
return fs::absolute(path, GetDataDir(net_specific));
|
return fs::absolute(path, GetDataDir(net_specific));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue