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
This commit is contained in:
Nick Mathewson
2008-03-18 16:08:55 +00:00
parent 1c614a1a0c
commit 877ee496b1
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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.
+1 -1
View File
@@ -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;
}