Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12889/src
Modified Files:
win32file.i
Log Message:
win32file.ReadDirectoryChanges ignored 1 char filenames.
>From Niki Spahiev.
Index: win32file.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** win32file.i 20 Sep 2006 10:41:06 -0000 1.65
--- win32file.i 20 Nov 2006 22:21:48 -0000 1.66
***************
*** 1554,1558 ****
FILE_NOTIFY_INFORMATION *p = (FILE_NOTIFY_INFORMATION *)buffer;
PyObject *ret = PyList_New(0);
! if (nbytes < sizeof FILE_NOTIFY_INFORMATION)
return ret;
DWORD nbytes_read = 0;
--- 1554,1562 ----
FILE_NOTIFY_INFORMATION *p = (FILE_NOTIFY_INFORMATION *)buffer;
PyObject *ret = PyList_New(0);
! // comparing against the sizeof(FILE_NOTIFY_INFORMATION) fails when
! // the filename is exactly 1 byte! Not clear the best way to
! // check this, but this works for now - is it at least the size of
! // the *head* of the struct.
! if (nbytes < sizeof DWORD*3+2)
return ret;
DWORD nbytes_read = 0;
|