diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index df8fb7cece4..3cb25e5c01b 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -817,7 +817,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co if (failedToGetAuthCookie) { throw std::runtime_error(strprintf( "Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (%s)", - fs::PathToString(GetConfigFile(gArgs.GetPathArg("-conf", BITCOIN_CONF_FILENAME))))); + fs::PathToString(gArgs.GetConfigFilePath()))); } else { throw std::runtime_error("Authorization failed: Incorrect rpcuser or rpcpassword"); } diff --git a/src/init/common.cpp b/src/init/common.cpp index e1a37d7db93..f6f97f39146 100644 --- a/src/init/common.cpp +++ b/src/init/common.cpp @@ -121,7 +121,7 @@ bool StartLogging(const ArgsManager& args) LogPrintf("Using data directory %s\n", fs::PathToString(gArgs.GetDataDirNet())); // Only log conf file usage message if conf file actually exists. - fs::path config_file_path = GetConfigFile(args.GetPathArg("-conf", BITCOIN_CONF_FILENAME)); + fs::path config_file_path = args.GetConfigFilePath(); if (fs::exists(config_file_path)) { LogPrintf("Config file: %s\n", fs::PathToString(config_file_path)); } else if (args.IsArgSet("-conf")) { diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index bedf367f051..67c5295ae30 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -428,7 +428,7 @@ void openDebugLogfile() bool openBitcoinConf() { - fs::path pathConfig = GetConfigFile(gArgs.GetPathArg("-conf", BITCOIN_CONF_FILENAME)); + fs::path pathConfig = gArgs.GetConfigFilePath(); /* Create the file */ std::ofstream configFile{pathConfig, std::ios_base::app};