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;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out whether path is a file or a directory. */
|
/* Setting this flag makes it possible to open a directory. */
|
||||||
if (GetFileAttributesW(path) & FILE_ATTRIBUTE_DIRECTORY) {
|
|
||||||
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
|
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
|
||||||
}
|
|
||||||
|
|
||||||
file = CreateFileW(path,
|
file = CreateFileW(path,
|
||||||
access,
|
access,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user