From 5bb7aa986efef3c11a68ff2b5a22c6a28c014835 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 23 Jun 2012 12:48:40 +0200 Subject: [PATCH] Try to fix shutil.which() tests on Windows by fixing a typo introduced in 27f9c26fdd8b in posix_access(). --- Modules/posixmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 1f1711df8fa..30b797c2ab1 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