Skip to content

Commit 69c99b8

Browse files
committed
Merge branch 'js/lstat-mingw-enotdir-fix' into maint
Fix to lstat() emulation on Windows. source: <[email protected]> * js/lstat-mingw-enotdir-fix: lstat(mingw): correctly detect ENOTDIR scenarios
2 parents 9166bca + 82ba119 commit 69c99b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compat/mingw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ static int has_valid_directory_prefix(wchar_t *wfilename)
768768
wfilename[n] = L'\0';
769769
attributes = GetFileAttributesW(wfilename);
770770
wfilename[n] = c;
771-
if (attributes == FILE_ATTRIBUTE_DIRECTORY ||
772-
attributes == FILE_ATTRIBUTE_DEVICE)
771+
if (attributes &
772+
(FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE))
773773
return 1;
774774
if (attributes == INVALID_FILE_ATTRIBUTES)
775775
switch (GetLastError()) {

0 commit comments

Comments
 (0)