mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
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-
This commit is contained in:
parent
4c3a5dcbfc
commit
b3e67f20a0
3 changed files with 4 additions and 4 deletions
|
@ -536,7 +536,7 @@ int GuiMain(int argc, char* argv[])
|
||||||
if (!Intro::showIfNeeded(did_show_intro, prune_MiB)) return EXIT_SUCCESS;
|
if (!Intro::showIfNeeded(did_show_intro, prune_MiB)) return EXIT_SUCCESS;
|
||||||
|
|
||||||
/// 6. Determine availability of data directory and parse bitcoin.conf
|
/// 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()) {
|
if (!CheckDataDirOption()) {
|
||||||
InitError(strprintf(Untranslated("Specified data directory \"%s\" does not exist.\n"), gArgs.GetArg("-datadir", "")));
|
InitError(strprintf(Untranslated("Specified data directory \"%s\" does not exist.\n"), gArgs.GetArg("-datadir", "")));
|
||||||
QMessageBox::critical(nullptr, PACKAGE_NAME,
|
QMessageBox::critical(nullptr, PACKAGE_NAME,
|
||||||
|
|
|
@ -195,7 +195,7 @@ void OptionsModel::Reset()
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
// Backup old settings to chain-specific datadir for troubleshooting
|
// 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
|
// Save the strDataDir setting
|
||||||
QString dataDir = GUIUtil::getDefaultDataDirectory();
|
QString dataDir = GUIUtil::getDefaultDataDirectory();
|
||||||
|
|
|
@ -49,9 +49,9 @@ static QString ipcServerName()
|
||||||
QString name("BitcoinQt");
|
QString name("BitcoinQt");
|
||||||
|
|
||||||
// Append a simple hash of the datadir
|
// 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
|
// for -testnet versus main net
|
||||||
QString ddir(GUIUtil::boostPathToQString(GetDataDir(true)));
|
QString ddir(GUIUtil::boostPathToQString(gArgs.GetDataDirNet()));
|
||||||
name.append(QString::number(qHash(ddir)));
|
name.append(QString::number(qHash(ddir)));
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
|
|
Loading…
Add table
Reference in a new issue