FileUtil: Remove GetSysDirectory log spam
Create and log path the first time GetSysDirectory is called, then just return the path on future calls.
This commit is contained in:
parent
4d563ce4d1
commit
c2be78079c
|
@ -885,7 +885,7 @@ std::string GetExeDirectory()
|
|||
#endif
|
||||
}
|
||||
|
||||
std::string GetSysDirectory()
|
||||
static std::string CreateSysDirectoryPath()
|
||||
{
|
||||
std::string sysDir;
|
||||
|
||||
|
@ -913,10 +913,16 @@ std::string GetSysDirectory()
|
|||
#endif
|
||||
sysDir += DIR_SEP;
|
||||
|
||||
INFO_LOG_FMT(COMMON, "GetSysDirectory: Setting to {}:", sysDir);
|
||||
INFO_LOG_FMT(COMMON, "CreateSysDirectoryPath: Setting to {}", sysDir);
|
||||
return sysDir;
|
||||
}
|
||||
|
||||
const std::string& GetSysDirectory()
|
||||
{
|
||||
static const std::string sys_directory = CreateSysDirectoryPath();
|
||||
return sys_directory;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
void SetSysDirectory(const std::string& path)
|
||||
{
|
||||
|
|
|
@ -215,7 +215,7 @@ void SetUserPath(unsigned int dir_index, std::string path);
|
|||
std::string GetThemeDir(const std::string& theme_name);
|
||||
|
||||
// Returns the path to where the sys file are
|
||||
std::string GetSysDirectory();
|
||||
const std::string& GetSysDirectory();
|
||||
|
||||
#ifdef ANDROID
|
||||
void SetSysDirectory(const std::string& path);
|
||||
|
|
Loading…
Reference in New Issue