mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
merge from trunk
This commit is contained in:
parent
2d8dcdcb06
commit
f10a79aad4
40 changed files with 621 additions and 305 deletions
|
@ -751,11 +751,16 @@ win32_wchdir(LPCWSTR path)
|
|||
if (!result)
|
||||
return FALSE;
|
||||
if (result > MAX_PATH+1) {
|
||||
new_path = malloc(result);
|
||||
new_path = malloc(result * sizeof(wchar_t));
|
||||
if (!new_path) {
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
result = GetCurrentDirectoryW(result, new_path);
|
||||
if (!result) {
|
||||
free(new_path);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if (wcsncmp(new_path, L"\\\\", 2) == 0 ||
|
||||
wcsncmp(new_path, L"//", 2) == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue