Skip to content

Commit f6d84d1

Browse files
committed
Allow files to be opened for reading multiple times
1 parent cb8e3f7 commit f6d84d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/env_win.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ BOOL Win32RandomAccessFile::_Init( LPCWSTR path )
420420
{
421421
BOOL bRet = FALSE;
422422
if(!_hFile)
423-
_hFile = ::CreateFileW(path,GENERIC_READ,0,NULL,OPEN_EXISTING,
423+
_hFile = ::CreateFileW(path,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,
424424
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,NULL);
425425
if(!_hFile || _hFile == INVALID_HANDLE_VALUE )
426426
_hFile = NULL;

0 commit comments

Comments
 (0)