]> granicus.if.org Git - python/commitdiff
Try to fix shutil.which() tests on Windows by fixing a typo introduced in 27f9c26fdd8...
authorGeorg Brandl <georg@python.org>
Sat, 23 Jun 2012 10:48:40 +0000 (12:48 +0200)
committerGeorg Brandl <georg@python.org>
Sat, 23 Jun 2012 10:48:40 +0000 (12:48 +0200)
Modules/posixmodule.c

index 1f1711df8fa8225e5461f3d9796a4bdf83b1491b..30b797c2ab1525e2b639be65827cfa720ba790dc 100644 (file)
@@ -2430,7 +2430,7 @@ posix_access(PyObject *self, PyObject *args, PyObject *kwargs)
     */
     return_value = PyBool_FromLong(
         (attr != 0xFFFFFFFF) &&
-            ((mode & 2) ||
+            (!(mode & 2) ||
             !(attr & FILE_ATTRIBUTE_READONLY) ||
             (attr & FILE_ATTRIBUTE_DIRECTORY)));
 #else