P4 to Git Change 1151506 by rili@rili_opencl_stg on 2015/05/15 14:56:06
EPR #418590 - Fix improper check for temp path. - Existing code will change temp path to "." if tempPath is "C:\Windows\Temp\" - Need to make sure temp path will be changed to "." if tempPath is "C:\Windows\" or "C:\Windows" Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/os/os_win32.cpp#44 edit
Этот коммит содержится в:
@@ -709,8 +709,12 @@ Os::getTempPath()
|
||||
// under windows directory, use . instead
|
||||
std::string tempPathStr(tempPath);
|
||||
char winPath[MAX_PATH];
|
||||
ret = GetWindowsDirectory(winPath, MAX_PATH);
|
||||
if (ret > 0) {
|
||||
if (GetWindowsDirectory(winPath, MAX_PATH) > 0) {
|
||||
// Need to check if tempPath is C:\Windows or C:\Windows\ //
|
||||
if (tempPath[strlen(tempPath)-1] == '\\') {
|
||||
tempPath[strlen(tempPath)-1] = '\0' ;
|
||||
ret--;
|
||||
}
|
||||
if (_memicmp(tempPath, winPath, ret) == 0) {
|
||||
return std::string(".");
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user