mercurial/pure/osutil.py
changeset 16686 67964cda8701
parent 16474 ee553e6cd8c4
child 17429 72fa4ef2245f
equal deleted inserted replaced
16685:43d55088415a 16686:67964cda8701
   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 '+'