[Paraview-developers] vtkPVServerFileListing:: FileIsReadable

Brad King brad.king at kitware.com
Wed Jan 12 16:04:11 EST 2005


Moreland, Kenneth wrote:
> Oh, yeah.  This is on Win32.  I meant to specify that and forgot.
> 
> When GetFileAttributes fails, it returns 0xFFFFFFFF.  FileIsReadable is
> not checking for that.  Instead, it checks to see if the
> FILE_ATTRIBUTE_NORMAL bit is set (which it is) and assumes the file
> exists and is readable.

According to the documentation GetFileAttributes returns 
INVALID_FILE_ATTRIBUTES if it fails.  This constant does not seem to 
exist on MSVC 6, but it is defined to -1 on MSVC 7.1.  Using -1 seems to 
work for MSVC 6, though.  I'll commit a fix.

Thanks,
-Brad


More information about the Paraview-developers mailing list