Mercurial > dwindows
comparison win/dirent.c @ 184:4ec906d40ce2
FindFirstFile returns INVALID_HANDLE_VALUE on error, not NULL.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 19 Dec 2002 02:18:12 +0000 |
parents | 67a643a734d9 |
children | e320dc29bfcd |
comparison
equal
deleted
inserted
replaced
183:b5a92b04b298 | 184:4ec906d40ce2 |
---|---|
104 | 104 |
105 dir->fstype = getFSType(dir->name); | 105 dir->fstype = getFSType(dir->name); |
106 dir->attrmask = att_mask | A_DIR; | 106 dir->attrmask = att_mask | A_DIR; |
107 | 107 |
108 dir->count = 100; | 108 dir->count = 100; |
109 if((dir->handle = FindFirstFile(dir->name, &dir->data))==NULL) | 109 if((dir->handle = FindFirstFile(dir->name, &dir->data))==INVALID_HANDLE_VALUE) |
110 { | 110 { |
111 free(dir); | 111 free(dir); |
112 error(rc); | 112 error(rc); |
113 return NULL; | 113 return NULL; |
114 } | 114 } |