mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Use GetPathArg where possible
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
This commit is contained in:
parent
5b946edd73
commit
60aa179d8f
3 changed files with 5 additions and 8 deletions
|
|
@ -135,7 +135,7 @@ static const char* BITCOIN_PID_FILENAME = "bitcoind.pid";
|
|||
|
||||
static fs::path GetPidFile(const ArgsManager& args)
|
||||
{
|
||||
return AbsPathForConfigVal(fs::PathFromString(args.GetArg("-pid", BITCOIN_PID_FILENAME)));
|
||||
return AbsPathForConfigVal(args.GetPathArg("-pid", BITCOIN_PID_FILENAME));
|
||||
}
|
||||
|
||||
[[nodiscard]] static bool CreatePidFile(const ArgsManager& args)
|
||||
|
|
@ -1229,10 +1229,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
// Read asmap file if configured
|
||||
std::vector<bool> asmap;
|
||||
if (args.IsArgSet("-asmap")) {
|
||||
fs::path asmap_path = fs::PathFromString(args.GetArg("-asmap", ""));
|
||||
if (asmap_path.empty()) {
|
||||
asmap_path = fs::PathFromString(DEFAULT_ASMAP_FILENAME);
|
||||
}
|
||||
fs::path asmap_path = args.GetPathArg("-asmap", DEFAULT_ASMAP_FILENAME);
|
||||
if (!asmap_path.is_absolute()) {
|
||||
asmap_path = gArgs.GetDataDirNet() / asmap_path;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue