mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
posixfile_nt: '+' was understood as read mode instead of update.
This commit is contained in:
parent
56d1444a26
commit
4a8150bcb8
@ -209,9 +209,9 @@ class posixfile_nt(object):
|
||||
|
||||
def __init__(self, name, mode='rb'):
|
||||
access = 0
|
||||
if 'r' in mode or '+' in mode:
|
||||
if 'r' in mode:
|
||||
access |= win32file.GENERIC_READ
|
||||
if 'w' in mode or 'a' in mode:
|
||||
if 'w' in mode or 'a' in mode or '+' in mode:
|
||||
access |= win32file.GENERIC_WRITE
|
||||
if 'r' in mode:
|
||||
creation = win32file.OPEN_EXISTING
|
||||
|
Loading…
Reference in New Issue
Block a user