Return absolute path early in AbsPathForConfigVal

This prevents premature GetDataDir() calls, e.g., when config file is
not read yet.
pull/764/head
Hennadii Stepanov 6 years ago
parent 0626b8cbdf
commit c1f325126c
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -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…
Cancel
Save