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:
parent
cb58a5634d
commit
bc4126bfaa
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user