mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Fix config directory.
This commit is contained in:
parent
374091b122
commit
c22027be6a
1 changed files with 2 additions and 3 deletions
|
|
@ -30,13 +30,12 @@ inline std::filesystem::path GetUserPath()
|
||||||
if (homeDir != nullptr)
|
if (homeDir != nullptr)
|
||||||
{
|
{
|
||||||
// Prefer to store in the .config directory if it exists. Use the home directory otherwise.
|
// Prefer to store in the .config directory if it exists. Use the home directory otherwise.
|
||||||
const std::string dirName = "." USER_DIRECTORY;
|
|
||||||
std::filesystem::path homePath = homeDir;
|
std::filesystem::path homePath = homeDir;
|
||||||
std::filesystem::path configPath = homePath / ".config";
|
std::filesystem::path configPath = homePath / ".config";
|
||||||
if (std::filesystem::exists(configPath))
|
if (std::filesystem::exists(configPath))
|
||||||
userPath = configPath / dirName;
|
userPath = configPath / USER_DIRECTORY;
|
||||||
else
|
else
|
||||||
userPath = homePath / dirName;
|
userPath = homePath / ("." USER_DIRECTORY);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static_assert(false, "GetUserPath() not implemented for this platform.");
|
static_assert(false, "GetUserPath() not implemented for this platform.");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue