changeset: 70816:23e14af406df parent: 70813:b290ca599df6 parent: 70815:1524a60016d0 user: Brian Curtin date: Tue Jun 14 10:06:41 2011 -0500 files: Lib/test/support.py Misc/NEWS Modules/posixmodule.c description: Merge 3.2 - update to the fix for #12084 diff -r b290ca599df6 -r 23e14af406df Modules/posixmodule.c --- a/Modules/posixmodule.c Mon Jun 13 16:03:01 2011 -0500 +++ b/Modules/posixmodule.c Tue Jun 14 10:06:41 2011 -0500 @@ -1131,6 +1131,11 @@ return FALSE; buf = (wchar_t *)malloc((buf_size+1)*sizeof(wchar_t)); + if (!buf) { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + result_length = Py_GetFinalPathNameByHandleW(hdl, buf, buf_size, VOLUME_NAME_DOS); @@ -1165,11 +1170,9 @@ const char *dot; if(!check_GetFinalPathNameByHandle()) { - /* If the OS doesn't have GetFinalPathNameByHandle, return a - NotImplementedError. */ - PyErr_SetString(PyExc_NotImplementedError, - "GetFinalPathNameByHandle not available on this platform"); - return -1; + /* If the OS doesn't have GetFinalPathNameByHandle, don't + traverse reparse point. */ + traverse = FALSE; } hFile = CreateFileA( @@ -1263,11 +1266,9 @@ const wchar_t *dot; if(!check_GetFinalPathNameByHandle()) { - /* If the OS doesn't have GetFinalPathNameByHandle, return a - NotImplementedError. */ - PyErr_SetString(PyExc_NotImplementedError, - "GetFinalPathNameByHandle not available on this platform"); - return -1; + /* If the OS doesn't have GetFinalPathNameByHandle, don't + traverse reparse point. */ + traverse = FALSE; } hFile = CreateFileW(