mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Change ClearDataDirPathCache() to ArgsManager.ClearPathCache().
This commit is contained in:
parent
b4190eff72
commit
bb8d1c6e02
4 changed files with 9 additions and 16 deletions
|
|
@ -445,7 +445,7 @@ const fs::path& ArgsManager::GetDataDirPath(bool net_specific) const
|
|||
return path;
|
||||
}
|
||||
|
||||
void ArgsManager::ClearDatadirPathCache()
|
||||
void ArgsManager::ClearPathCache()
|
||||
{
|
||||
LOCK(cs_args);
|
||||
|
||||
|
|
@ -813,11 +813,6 @@ bool CheckDataDirOption()
|
|||
return datadir.empty() || fs::is_directory(fs::system_complete(datadir));
|
||||
}
|
||||
|
||||
void ClearDatadirCache()
|
||||
{
|
||||
gArgs.ClearDatadirPathCache();
|
||||
}
|
||||
|
||||
fs::path GetConfigFile(const std::string& confPath)
|
||||
{
|
||||
return AbsPathForConfigVal(fs::path(confPath), false);
|
||||
|
|
@ -976,7 +971,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
|
|||
}
|
||||
|
||||
// If datadir is changed in .conf file:
|
||||
ClearDatadirCache();
|
||||
gArgs.ClearPathCache();
|
||||
if (!CheckDataDirOption()) {
|
||||
error = strprintf("specified data directory \"%s\" does not exist.", GetArg("-datadir", ""));
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue