Windows: skip GetFileAttributes call when opening a file

It wasn't working, and everything seemed to work fine nonetheless. Removing it just saves a syscall.
This commit is contained in:
Bert Belder 2012-05-04 14:31:48 -07:00
parent cb58a5634d
commit bc4126bfaa

View File

@ -248,10 +248,8 @@ void fs__open(uv_fs_t* req, const wchar_t* path, int flags, int mode) {
goto end;
}
/* Figure out whether path is a file or a directory. */
if (GetFileAttributesW(path) & FILE_ATTRIBUTE_DIRECTORY) {
/* Setting this flag makes it possible to open a directory. */
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
}
file = CreateFileW(path,
access,