mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Add ArgsManager.GetDataDirBase() and ArgsManager.GetDataDirNet() as an intended replacement for ArgsManager.GetDataDirPath(net_identifier)
This commit is contained in:
@@ -404,7 +404,7 @@ const fs::path& ArgsManager::GetBlocksDirPath() const
|
||||
return path;
|
||||
}
|
||||
} else {
|
||||
path = GetDataDirPath(false);
|
||||
path = GetDataDirBase();
|
||||
}
|
||||
|
||||
path /= BaseParams().DataDir();
|
||||
@@ -513,7 +513,7 @@ bool ArgsManager::GetSettingsPath(fs::path* filepath, bool temp) const
|
||||
}
|
||||
if (filepath) {
|
||||
std::string settings = GetArg("-settings", BITCOIN_SETTINGS_FILENAME);
|
||||
*filepath = fsbridge::AbsPathJoin(GetDataDirPath(/* net_specific= */ true), temp ? settings + ".tmp" : settings);
|
||||
*filepath = fsbridge::AbsPathJoin(GetDataDirNet(), temp ? settings + ".tmp" : settings);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -804,7 +804,7 @@ fs::path GetDefaultDataDir()
|
||||
|
||||
const fs::path &GetDataDir(bool fNetSpecific)
|
||||
{
|
||||
return gArgs.GetDataDirPath(fNetSpecific);
|
||||
return fNetSpecific ? gArgs.GetDataDirNet() : gArgs.GetDataDirBase();
|
||||
}
|
||||
|
||||
bool CheckDataDirOption()
|
||||
@@ -1361,7 +1361,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
|
||||
if (path.is_absolute()) {
|
||||
return path;
|
||||
}
|
||||
return fsbridge::AbsPathJoin(GetDataDir(net_specific), path);
|
||||
return fsbridge::AbsPathJoin(net_specific ? gArgs.GetDataDirNet() : gArgs.GetDataDirBase(), path);
|
||||
}
|
||||
|
||||
void ScheduleBatchPriority()
|
||||
|
||||
Reference in New Issue
Block a user