diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-04 13:31:18 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-24 10:29:58 +0200 |
commit | b3e67f20a02bcf43f20873029ce30617c95eb9da (patch) | |
tree | 947dcdbba47b2f5cd4f203fb1ab269b05c0d10ee | |
parent | 4c3a5dcbfc3010965332ad568c3a70618c930ef3 (diff) |
scripted-diff: Replace `GetDataDir(true)` calls with `gArgs.GetDataDirNet()` calls
-BEGIN VERIFY SCRIPT-
git ls-files -- 'src' ':(exclude)src/util/system.h' ':(exclude)src/util/system.cpp' | xargs sed -i 's/GetDataDir(true)/gArgs.GetDataDirNet()/g';
-END VERIFY SCRIPT-
-rw-r--r-- | src/qt/bitcoin.cpp | 2 | ||||
-rw-r--r-- | src/qt/optionsmodel.cpp | 2 | ||||
-rw-r--r-- | src/qt/paymentserver.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 686772e6bb..dffdd5158b 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -536,7 +536,7 @@ int GuiMain(int argc, char* argv[]) if (!Intro::showIfNeeded(did_show_intro, prune_MiB)) return EXIT_SUCCESS; /// 6. Determine availability of data directory and parse bitcoin.conf - /// - Do not call GetDataDir(true) before this step finishes + /// - Do not call gArgs.GetDataDirNet() before this step finishes if (!CheckDataDirOption()) { InitError(strprintf(Untranslated("Specified data directory \"%s\" does not exist.\n"), gArgs.GetArg("-datadir", ""))); QMessageBox::critical(nullptr, PACKAGE_NAME, diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index d51a5b06ff..70762ab6bc 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -195,7 +195,7 @@ void OptionsModel::Reset() QSettings settings; // Backup old settings to chain-specific datadir for troubleshooting - BackupSettings(GetDataDir(true) / "guisettings.ini.bak", settings); + BackupSettings(gArgs.GetDataDirNet() / "guisettings.ini.bak", settings); // Save the strDataDir setting QString dataDir = GUIUtil::getDefaultDataDirectory(); diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index d58d13f722..098fe5ac61 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -49,9 +49,9 @@ static QString ipcServerName() QString name("BitcoinQt"); // Append a simple hash of the datadir - // Note that GetDataDir(true) returns a different path + // Note that gArgs.GetDataDirNet() returns a different path // for -testnet versus main net - QString ddir(GUIUtil::boostPathToQString(GetDataDir(true))); + QString ddir(GUIUtil::boostPathToQString(gArgs.GetDataDirNet())); name.append(QString::number(qHash(ddir))); return name; |