mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 04:50:35 +00:00
Prefer HOME variable to getpwuid on GGP
This commit is contained in:
committed by
baldurk
parent
0f4acb3956
commit
5529cb9c8d
@@ -73,8 +73,17 @@ string GetTempRootPath()
|
||||
|
||||
string GetAppFolderFilename(const string &filename)
|
||||
{
|
||||
passwd *pw = getpwuid(getuid());
|
||||
const char *homedir = pw->pw_dir;
|
||||
const char *homedir = NULL;
|
||||
if(getenv("HOME") != NULL)
|
||||
{
|
||||
homedir = getenv("HOME");
|
||||
RDCLOG("$HOME value is %s", homedir);
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCLOG("$HOME value is NULL");
|
||||
homedir = getpwuid(getuid())->pw_dir;
|
||||
}
|
||||
|
||||
string ret = string(homedir) + "/.renderdoc/";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user