diff options
author | James O'Beirne <james.obeirne@gmail.com> | 2018-01-30 22:33:49 -0500 |
---|---|---|
committer | James O'Beirne <james.obeirne@gmail.com> | 2018-02-05 17:48:59 -0500 |
commit | 54604600c3de6cb18540c0911127173f68ad246c (patch) | |
tree | b778b12ff044d505836aac17225354451e950515 /src/rpc | |
parent | a1e13055c2c57913d8d57ca0978cef2fec1e6148 (diff) |
Add AbsPathForConfigVal to consolidate datadir prefixing for path args
Most commandline/config args are interpreted as relative to datadir if
not passed absolute. Consolidate the logic for this normalization.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/protocol.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index ddc1bb6232..cdd2e67a69 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -72,9 +72,7 @@ static fs::path GetAuthCookieFile(bool temp=false) if (temp) { arg += ".tmp"; } - fs::path path(arg); - if (!path.is_complete()) path = GetDataDir() / path; - return path; + return AbsPathForConfigVal(fs::path(arg)); } bool GenerateAuthCookie(std::string *cookie_out) |