diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-04-29 22:46:34 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2019-07-24 18:42:59 +0300 |
commit | c1f325126cf51d28dce8da74bfdf5cd05ab237ea (patch) | |
tree | 8cd0b9cc71321f5e84d86b75b540d7c1e462e169 /src/util/system.cpp | |
parent | 0626b8cbdf0aa971500eb5613c7ab4096c496966 (diff) | |
download | bitcoin-c1f325126cf51d28dce8da74bfdf5cd05ab237ea.tar.xz |
Return absolute path early in AbsPathForConfigVal
This prevents premature GetDataDir() calls, e.g., when config file is
not read yet.
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r-- | src/util/system.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 72b37b9187..d9e23199ec 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -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)); } |