From: Georg Brandl Date: Sat, 23 Jun 2012 10:48:40 +0000 (+0200) Subject: Try to fix shutil.which() tests on Windows by fixing a typo introduced in 27f9c26fdd8... X-Git-Tag: v3.3.0b1~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bb7aa986efef3c11a68ff2b5a22c6a28c014835;p=python Try to fix shutil.which() tests on Windows by fixing a typo introduced in 27f9c26fdd8b in posix_access(). --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 1f1711df8f..30b797c2ab 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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