From 7dd78f15760ca556258517aff39b65c672267422 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 18 Mar 2008 16:08:49 +0000 Subject: r18929@catbus: nickm | 2008-03-18 12:08:16 -0400 Detect errors from directory listing correctly on win32. Bug found by lodger. svn:r14102 --- src/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3