aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-03-18 16:08:49 +0000
committerNick Mathewson <nickm@torproject.org>2008-03-18 16:08:49 +0000
commit7dd78f15760ca556258517aff39b65c672267422 (patch)
tree0a84d3ddbea2ab08dca09bc4a531f32c6ab79b09 /src
parent199d65d059ba90a151bb326c0280a488e94f9103 (diff)
downloadtor-7dd78f15760ca556258517aff39b65c672267422.tar
tor-7dd78f15760ca556258517aff39b65c672267422.tar.gz
r18929@catbus: nickm | 2008-03-18 12:08:16 -0400
Detect errors from directory listing correctly on win32. Bug found by lodger. svn:r14102
Diffstat (limited to 'src')
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 669905dc0..764938ed9 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;
}