|
a/src/windows/dirent.c |
|
b/src/windows/dirent.c |
|
... |
|
... |
101 |
if(dir && dir->handle != -1)
|
101 |
if(dir && dir->handle != -1)
|
102 |
{
|
102 |
{
|
103 |
if(!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1)
|
103 |
if(!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1)
|
104 |
{
|
104 |
{
|
105 |
result = &dir->result;
|
105 |
result = &dir->result;
|
|
|
106 |
result->d_mtime = dir->info.time_write;
|
|
|
107 |
result->d_size = dir->info.size;
|
106 |
result->d_name = dir->info.name;
|
108 |
result->d_name = dir->info.name;
|
|
|
109 |
if (dir->info.attrib & _A_SUBDIR)
|
|
|
110 |
result->d_mode = S_IFDIR;
|
|
|
111 |
else
|
|
|
112 |
result->d_mode = S_IFREG;
|
107 |
}
|
113 |
}
|
108 |
}
|
114 |
}
|
109 |
else
|
115 |
else
|
110 |
{
|
116 |
{
|
111 |
errno = EBADF;
|
117 |
errno = EBADF;
|