equal
deleted
inserted
replaced
117 flags = _O_BINARY |
117 flags = _O_BINARY |
118 else: |
118 else: |
119 flags = _O_TEXT |
119 flags = _O_TEXT |
120 |
120 |
121 m0 = mode[0] |
121 m0 = mode[0] |
122 if m0 == 'r' and not '+' in mode: |
122 if m0 == 'r' and '+' not in mode: |
123 flags |= _O_RDONLY |
123 flags |= _O_RDONLY |
124 access = _GENERIC_READ |
124 access = _GENERIC_READ |
125 else: |
125 else: |
126 # work around http://support.microsoft.com/kb/899149 and |
126 # work around http://support.microsoft.com/kb/899149 and |
127 # set _O_RDWR for 'w' and 'a', even if mode has no '+' |
127 # set _O_RDWR for 'w' and 'a', even if mode has no '+' |