diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-18 16:08:55 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-18 16:08:55 +0000 |
commit | 877ee496b1d4cf6a754d466306eb9c15ae0e0984 (patch) | |
tree | 861d9804b80906aa2ff7c748e0f225a9f92ced9c | |
parent | 1c614a1a0c7d69f48df2adb103938c255b8ae219 (diff) | |
download | tor-877ee496b1d4cf6a754d466306eb9c15ae0e0984.tar.gz tor-877ee496b1d4cf6a754d466306eb9c15ae0e0984.zip |
r18930@catbus: nickm | 2008-03-18 12:08:28 -0400
Backport to 0.2.0: Detect errors from directory listing correctly on win32. Bug found by lodger.
svn:r14103
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/common/util.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -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; } |