mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Fix infinite recursion on android getting environment variables
* We changed all uses of getenv to our Process::GetEnvironmentVariable in
a1422df, but on android this causes an infinite recursion because its
implementation of GetEnvironmentVariable uses LaunchProcess to query for the
variable, which then tries to look up the PATH variable (which does not exist
on android).
This commit is contained in:
@@ -85,6 +85,11 @@ rdcstr GetAppFolderFilename(const rdcstr &filename)
|
||||
return GetTempRootPath() + rdcstr("/") + filename;
|
||||
}
|
||||
|
||||
rdcstr FindFileInPath(const rdcstr &fileName)
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
||||
// For RenderDoc's apk, this returns our package name
|
||||
// For other APKs, we use it to get the writable temp directory.
|
||||
void GetExecutableFilename(rdcstr &selfName)
|
||||
|
||||
@@ -159,6 +159,12 @@ rdcstr GetAppFolderFilename(const rdcstr &filename)
|
||||
return ret + filename;
|
||||
}
|
||||
|
||||
rdcstr DefaultFindFileInPath(const rdcstr &fileName);
|
||||
rdcstr FindFileInPath(const rdcstr &fileName)
|
||||
{
|
||||
return DefaultFindFileInPath(fileName);
|
||||
}
|
||||
|
||||
void GetExecutableFilename(rdcstr &selfName)
|
||||
{
|
||||
char path[512] = {0};
|
||||
|
||||
@@ -92,6 +92,12 @@ rdcstr GetAppFolderFilename(const rdcstr &filename)
|
||||
return ret + filename;
|
||||
}
|
||||
|
||||
rdcstr DefaultFindFileInPath(const rdcstr &fileName);
|
||||
rdcstr FindFileInPath(const rdcstr &fileName)
|
||||
{
|
||||
return DefaultFindFileInPath(fileName);
|
||||
}
|
||||
|
||||
void GetExecutableFilename(rdcstr &selfName)
|
||||
{
|
||||
char path[512] = {0};
|
||||
|
||||
@@ -614,6 +614,12 @@ rdcstr GetAppFolderFilename(const rdcstr &filename)
|
||||
return ret + filename;
|
||||
}
|
||||
|
||||
rdcstr DefaultFindFileInPath(const rdcstr &fileName);
|
||||
rdcstr FindFileInPath(const rdcstr &fileName)
|
||||
{
|
||||
return DefaultFindFileInPath(fileName);
|
||||
}
|
||||
|
||||
void GetExecutableFilename(rdcstr &selfName)
|
||||
{
|
||||
char path[512] = {0};
|
||||
|
||||
@@ -101,7 +101,7 @@ rdcstr GetFullPathname(const rdcstr &filename)
|
||||
return rdcstr(path);
|
||||
}
|
||||
|
||||
rdcstr FindFileInPath(const rdcstr &fileName)
|
||||
rdcstr DefaultFindFileInPath(const rdcstr &fileName)
|
||||
{
|
||||
rdcstr filePath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user