fs/StandardDirectory: add GetUserRuntimeDir()

This commit is contained in:
Max Kellermann
2021-10-26 09:04:42 +02:00
parent 225d85fd9b
commit 1e6f5f012c
3 changed files with 19 additions and 1 deletions

View File

@@ -282,6 +282,16 @@ GetUserCacheDir() noexcept
#endif
}
AllocatedPath
GetUserRuntimeDir() noexcept
{
#ifdef USE_XDG
return SafePathFromFS(getenv("XDG_RUNTIME_DIR"));
#else
return nullptr;
#endif
}
#ifdef _WIN32
AllocatedPath