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:
Hennadii Stepanov 2019-04-29 22:46:34 +03:00
parent 0626b8cbdf
commit c1f325126c
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -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));
}