msvcrt: set mode bits in _fstati64

Dmitry Timoshkov dmitry at baikal.ru
Sat Dec 4 22:53:45 CST 2004


"Juan Lang" <juan_lang at yahoo.com> wrote:

> +  buf->st_mode = S_IFREG;
> +  if (!(hfi.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)))
> +  {
> +    buf->st_mode |= S_IREAD;
> +    if (!(hfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
> +      buf->st_mode |= S_IWRITE;
> +  }

Why do you take into account (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)
at all? They have nothing to do with an ability to read/write files. What
you probably need to consider is a type of a file passed in.

-- 
Dmitry.




More information about the wine-devel mailing list