Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

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.
  • Loading branch information...
piscisaureus committed May 4, 2012
1 parent b750dec commit 436589692148a87d1d0e55d2641288a4fe913b22
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/win/fs.c
@@ -224,10 +224,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. */

file = CreateFileW(path,

0 comments on commit 4365896

Please sign in to comment.
You can’t perform that action at this time.