mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Correct arithmetic in access on Win32. Fixes #1513646.
This commit is contained in:
parent
762fbd3485
commit
ee1e06d497
3 changed files with 18 additions and 1 deletions
|
@ -1402,7 +1402,7 @@ finish:
|
|||
return PyBool_FromLong(0);
|
||||
/* Access is possible if either write access wasn't requested, or
|
||||
the file isn't read-only. */
|
||||
return PyBool_FromLong(!(mode & 2) || !(attr && FILE_ATTRIBUTE_READONLY));
|
||||
return PyBool_FromLong(!(mode & 2) || !(attr & FILE_ATTRIBUTE_READONLY));
|
||||
#else
|
||||
int res;
|
||||
if (!PyArg_ParseTuple(args, "eti:access",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue