[or-cvs] r14102: Detect errors from directory listing correctly on win32. Bug (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Tue Mar 18 16:08:50 UTC 2008


Author: nickm
Date: 2008-03-18 12:08:49 -0400 (Tue, 18 Mar 2008)
New Revision: 14102

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/common/util.c
Log:
 r18929 at catbus:  nickm | 2008-03-18 12:08:16 -0400
 Detect errors from directory listing correctly on win32.  Bug found by lodger.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r18929] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-03-18 15:11:52 UTC (rev 14101)
+++ tor/trunk/ChangeLog	2008-03-18 16:08:49 UTC (rev 14102)
@@ -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

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2008-03-18 15:11:52 UTC (rev 14101)
+++ tor/trunk/src/common/util.c	2008-03-18 16:08:49 UTC (rev 14102)
@@ -2096,7 +2096,7 @@
   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;
   }



More information about the tor-commits mailing list