From 15b632bf169f6272ca90faba8d8036e3e822542f Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 4 Feb 2022 18:23:50 +0200 Subject: Use ArgsManager::GetPathArg() for "-datadir" option --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 330aab5184..6aef1f8149 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1150,7 +1150,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) LogPrintf("Using at most %i automatic connections (%i file descriptors available)\n", nMaxConnections, nFD); // Warn about relative -datadir path. - if (args.IsArgSet("-datadir") && !fs::PathFromString(args.GetArg("-datadir", "")).is_absolute()) { + if (args.IsArgSet("-datadir") && !args.GetPathArg("-datadir").is_absolute()) { LogPrintf("Warning: relative datadir option '%s' specified, which will be interpreted relative to the " /* Continued */ "current working directory '%s'. This is fragile, because if bitcoin is started in the future " "from a different location, it will be unable to locate the current data files. There could " -- cgit v1.2.3