diff --git a/ChangeLog b/ChangeLog index e8d2ffc4f3..5587a4d488 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ Changes in version 0.2.0.22-rc - 2008-03-17 at the BIO used (sometimes) to buffer data for the network. Looking at different BIOs could result in write counts on the order of ULONG_MAX. Fixes bug 614. + - On Windows, correctly detect errors when listing the contents of a + directory. Fix from lodger. o Minor bugfixes (on 0.2.0.x): - Downgrade "sslv3 alert handshake failure" message to INFO. diff --git a/src/common/util.c b/src/common/util.c index e263908c19..6cf7d00f32 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2096,7 +2096,7 @@ tor_listdir(const char *dirname) size_t pattern_len = strlen(dirname)+16; pattern = tor_malloc(pattern_len); tor_snprintf(pattern, pattern_len, "%s\\*", dirname); - if (!(handle = FindFirstFile(pattern, &findData))) { + if (INVALID_HANDLE_VALUE == (handle = FindFirstFile(pattern, &findData))) { tor_free(pattern); return NULL; }