mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-26 00:29:00 +00:00
Prefer HOME variable to getpwuid on GGP
This commit is contained in:
1 parent
0f4acb3956
commit
5529cb9c8d
1 file changed
+11
-2
@@ -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