mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-15 10:15:48 +00:00
Use our version of dirname on Linux
std::string::c_str returns "const char *" while POSIX dirname may modify the contents.
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
#include <unistd.h>
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "serialise/string_utils.h"
|
||||
|
||||
@@ -208,7 +207,7 @@ static pid_t RunProcess(const char *app, const char *workingDir, const char *cmd
|
||||
else
|
||||
{
|
||||
string exedir = app;
|
||||
chdir(dirname((char *)exedir.c_str()));
|
||||
chdir(dirname(exedir).c_str());
|
||||
}
|
||||
|
||||
execve(app, argv, envp);
|
||||
|
||||
Reference in New Issue
Block a user