P4 to Git Change 1074473 by rili@rili_opencl_stg on 2014/09/08 16:30:03

EPR #400016 - Keep the path of temp folder if the app is WIndows app

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/os/os_win32.cpp#39 edit


[ROCm/clr commit: 8f5b43ffd1]
This commit is contained in:
foreman
2014-09-08 16:44:37 -04:00
rodzic fb71ff26ca
commit 6bcb543bce
@@ -720,12 +720,8 @@ Os::getTempPath()
char winPath[MAX_PATH]; char winPath[MAX_PATH];
ret = GetWindowsDirectory(winPath, MAX_PATH); ret = GetWindowsDirectory(winPath, MAX_PATH);
if (ret > 0) { if (ret > 0) {
size_t len = strlen(winPath); if (_stricmp(tempPath, winPath) == 0) {
if (strlen(tempPath) >= len) { return std::string(".");
tempPath[len] = 0;
if (_stricmp(tempPath, winPath) == 0) {
return std::string(".");
}
} }
} }
return tempPathStr; return tempPathStr;