mercurial/win32.py
changeset 13374 1c613c1ae43d
parent 13285 2ef915184ff2
child 13375 f1fa8f481c7c
--- a/mercurial/win32.py	Thu Feb 10 13:46:28 2011 -0600
+++ b/mercurial/win32.py	Mon Feb 14 11:12:22 2011 +0100
@@ -31,8 +31,9 @@
 def _getfileinfo(pathname):
     """Return number of hardlinks for the given file."""
     try:
-        fh = win32file.CreateFile(pathname,
-            win32file.GENERIC_READ, win32file.FILE_SHARE_READ,
+        fh = win32file.CreateFile(pathname, 0,
+            win32file.FILE_SHARE_READ | win32file.FILE_SHARE_WRITE |
+            win32file.FILE_SHARE_DELETE,
             None, win32file.OPEN_EXISTING, 0, None)
     except pywintypes.error:
         raise OSError(errno.ENOENT, 'The system cannot find the file specified')