aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHüseyin Açacak <huseyin@janeasystems.com>2024-10-03 11:28:39 +0300
committerSaúl Ibarra Corretgé <s@saghul.net>2024-10-04 13:33:22 +0200
commit1cbffcbd5d097c31cdfa715f2a78fde93651d80c (patch)
treeeb57b70550f24b6986f0a889c21eb6daacddb3b4 /src
parent670e75ee7eecd7ce424aef8561b02f685decbd44 (diff)
downloadlibuv-1cbffcbd5d097c31cdfa715f2a78fde93651d80c.tar.gz
libuv-1cbffcbd5d097c31cdfa715f2a78fde93651d80c.zip
win,fs: fix bug in fs__readdir
Diffstat (limited to 'src')
-rw-r--r--src/win/fs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/win/fs.c b/src/win/fs.c
index 42f006a3..08b42eb1 100644
--- a/src/win/fs.c
+++ b/src/win/fs.c
@@ -1651,12 +1651,12 @@ void fs__readdir(uv_fs_t* req) {
goto error;
/* Copy file type. */
- if ((find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0)
- dent.d_type = UV__DT_DIR;
+ if ((find_data->dwFileAttributes & FILE_ATTRIBUTE_DEVICE) != 0)
+ dent.d_type = UV__DT_CHAR;
else if ((find_data->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0)
dent.d_type = UV__DT_LINK;
- else if ((find_data->dwFileAttributes & FILE_ATTRIBUTE_DEVICE) != 0)
- dent.d_type = UV__DT_CHAR;
+ else if ((find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0)
+ dent.d_type = UV__DT_DIR;
else
dent.d_type = UV__DT_FILE;