diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-06 16:00:41 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-02-06 16:14:12 +0100 |
commit | f6cd41d93e121466a1b7481324c47c3973d1ede0 (patch) | |
tree | db5a49a1cf02e8435a5b633ce1e3d270db05dc4c /src/rpc/protocol.cpp | |
parent | 88971352f6106d87156188cc0e29077baa05b86d (diff) | |
parent | 54604600c3de6cb18540c0911127173f68ad246c (diff) |
Merge #12305: [docs] [refactor] Add help messages for datadir path mangling
5460460 Add AbsPathForConfigVal to consolidate datadir prefixing for path args (James O'Beirne)
a1e1305 Clarify help messages for path args to mention datadir prefix (James O'Beirne)
Pull request description:
Change `-conf`'s help message to indicate that relative path values will be prefixed by the datadir path. This behavior probably merits clarification; it's kind of confusing when attempting to specify a configuration file in the current directory with `-conf=bitcoin.conf`, but instead loading the `bitcoin.conf` file in ~/.bitcoin datadir.
### Edit
This PR has been modified to document all cases where relative path configurations are modified to be under datadir. A small refactoring has also been added which consolidates this normalization.
Tree-SHA512: be4fc0595fbeba33d17af08f59898af45e76a44f00719ea0282403b155ac6755584604fab765250a3aa14ed6991882c4d1ccbe601184362c5ba97c886bdda344
Diffstat (limited to 'src/rpc/protocol.cpp')
-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) |