diff options
author | Erik Faye-Lund <kusmabite@gmail.com> | 2010-11-23 19:38:27 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-23 16:06:47 -0800 |
commit | 9585ed519c59d5ac46f8e12b339220cdd0567b7d (patch) | |
tree | 3f182d4e555918abcae2cf4dc4b4821dd805ba4a /compat/mingw.c | |
parent | 20c6788aced1237489824db3b25285afed0ad169 (diff) | |
download | git-9585ed519c59d5ac46f8e12b339220cdd0567b7d.tar.gz |
win32: dirent: handle errors
Previously all error conditions were ignored. Be nice, and set errno
when we should.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/mingw.c')
-rw-r--r-- | compat/mingw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 29f403649f..9f8f37f062 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1582,7 +1582,7 @@ struct dirent *mingw_readdir(DIR *dir) HANDLE handle; struct mingw_DIR *mdir = (struct mingw_DIR*)dir; - if (!dir->dd_handle) { + if (!dir || !dir->dd_handle) { errno = EBADF; /* No set_errno for mingw */ return NULL; } |