diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-18 16:08:49 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-18 16:08:49 +0000 |
commit | 7dd78f15760ca556258517aff39b65c672267422 (patch) | |
tree | 0a84d3ddbea2ab08dca09bc4a531f32c6ab79b09 | |
parent | 199d65d059ba90a151bb326c0280a488e94f9103 (diff) | |
download | tor-7dd78f15760ca556258517aff39b65c672267422.tar.gz tor-7dd78f15760ca556258517aff39b65c672267422.zip |
r18929@catbus: nickm | 2008-03-18 12:08:16 -0400
Detect errors from directory listing correctly on win32. Bug found by lodger.
svn:r14102
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/common/util.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,8 @@ Changes in version 0.2.1.1-alpha - 2008-??-?? o Minor bugfixes: - Stop giving double-close warn when we reject an address for client DNS. + - On Windows, correctly detect errors when listing the contents of a + directory. Fix from lodger. (Bugfix on 0.1.2.x.) o Minor features: - Allow separate log levels to be configured for different logging diff --git a/src/common/util.c b/src/common/util.c index 669905dc03..764938ed9a 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; } |