posixfile_nt: '+' was understood as read mode instead of update.
authorPatrick Mezard <pmezard@gmail.com>
Tue, 17 Jul 2007 23:33:42 +0200
changeset 4921 8a53b39cd402
parent 4901 27414950abf5
child 4922 020ee9c781cf
posixfile_nt: '+' was understood as read mode instead of update.
mercurial/util_win32.py
--- a/mercurial/util_win32.py	Tue Jul 17 09:39:30 2007 -0700
+++ b/mercurial/util_win32.py	Tue Jul 17 23:33:42 2007 +0200
@@ -209,9 +209,9 @@
 
     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