refactor: Stop using gArgs global in system.cpp
Most of the code in util/system.cpp that was hardcoded to use the global ArgsManager instance `gArgs` has been changed to work with explicit ArgsManager instances (for example in https://github.com/bitcoin/bitcoin/pull/20092). But a few hardcoded references to `gArgs` remain. This commit removes the last ones so these functions aren't reading or writing global state.
This commit is contained in:
1 parent
b20b34f5b3
commit
9a9d5da11f
9 files changed
+22
-20
No files matched your search
+1
-1
@@ -588,7 +588,7 @@ int GuiMain(int argc, char* argv[])
|
||||
if (!Intro::showIfNeeded(did_show_intro, prune_MiB)) return EXIT_SUCCESS;
|
||||
|
||||
/// 6a. Determine availability of data directory
|
||||
if (!CheckDataDirOption()) {
|
||||
if (!CheckDataDirOption(gArgs)) {
|
||||
InitError(strprintf(Untranslated("Specified data directory \"%s\" does not exist.\n"), gArgs.GetArg("-datadir", "")));
|
||||
QMessageBox::critical(nullptr, PACKAGE_NAME,
|
||||
QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(gArgs.GetArg("-datadir", ""))));
|
||||
|
||||
Reference in new issue
Block a user