From 551b367f19dce1951362a1f9911004e583732376 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 28 Apr 2013 14:15:34 +0200 Subject: [PATCH] Allow files to be opened for reading multiple times --- src/leveldb/util/env_win.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leveldb/util/env_win.cc b/src/leveldb/util/env_win.cc index 4730192bf..ef2ecae83 100644 --- a/src/leveldb/util/env_win.cc +++ b/src/leveldb/util/env_win.cc @@ -420,7 +420,7 @@ BOOL Win32RandomAccessFile::_Init( LPCWSTR path ) { BOOL bRet = FALSE; if(!_hFile) - _hFile = ::CreateFileW(path,GENERIC_READ,0,NULL,OPEN_EXISTING, + _hFile = ::CreateFileW(path,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,NULL); if(!_hFile || _hFile == INVALID_HANDLE_VALUE ) _hFile = NULL;