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);
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(
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(