Temporary WA for getcwd
This reverts commit df6cd7e7d8
.
Change-Id: I360c44ebaef5d74368ee63cb4d98858e646238bf
This commit is contained in:
parent
8c1db4fb2f
commit
8c43332f53
|
@ -32,6 +32,7 @@ const char *fSeparator = "\\";
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
const char *fSeparator = "/";
|
const char *fSeparator = "/";
|
||||||
#endif
|
#endif
|
||||||
|
std::string cwd;
|
||||||
|
|
||||||
Environment *gEnvironment;
|
Environment *gEnvironment;
|
||||||
|
|
||||||
|
@ -42,13 +43,19 @@ std::string getRunPath() {
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
res = getcwd(nullptr, 0);
|
res = getcwd(nullptr, 0);
|
||||||
#else
|
#else
|
||||||
res = _getcwd(nullptr, 0);
|
res = cwd;
|
||||||
#endif
|
#endif
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
int retVal = 0;
|
int retVal = 0;
|
||||||
|
std::string execPath(argv[0]);
|
||||||
|
char separator = '/';
|
||||||
|
if (execPath.find_last_of("\\") != std::string::npos)
|
||||||
|
separator = '\\';
|
||||||
|
cwd = execPath.substr(0, execPath.find_last_of(separator));
|
||||||
|
|
||||||
bool useDefaultListener = false;
|
bool useDefaultListener = false;
|
||||||
std::string devicePrefix("skl");
|
std::string devicePrefix("skl");
|
||||||
std::string familyNameWithType("Gen9core");
|
std::string familyNameWithType("Gen9core");
|
||||||
|
|
Loading…
Reference in New Issue