Temporary WA for getcwd

Change-Id: Icf480eda830210dfff505a040cb2a3b0d6a78f67
This commit is contained in:
Koska, Andrzej
2018-07-27 10:08:43 +02:00
committed by sys_ocldev
parent bd9ac40bab
commit 541ea73e19

View File

@@ -32,6 +32,7 @@ const char *fSeparator = "\\";
#elif defined(__linux__)
const char *fSeparator = "/";
#endif
std::string cwd;
Environment *gEnvironment;
@@ -42,13 +43,19 @@ std::string getRunPath() {
#if defined(__linux__)
res = getcwd(nullptr, 0);
#else
res = _getcwd(nullptr, 0);
res = cwd;
#endif
return res;
}
int main(int argc, char **argv) {
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;
std::string devicePrefix("skl");
std::string familyNameWithType("Gen9core");