From f3727fd2ad229b05ce72cc4994b767bbee6db5c6 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 28 Aug 2013 09:34:32 +0200 Subject: [PATCH] Fixed sharing mode when opening file. --- src/platforms/windows/windowsFile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platforms/windows/windowsFile.cpp b/src/platforms/windows/windowsFile.cpp index a5a9089b..fd8a9651 100644 --- a/src/platforms/windows/windowsFile.cpp +++ b/src/platforms/windows/windowsFile.cpp @@ -207,7 +207,7 @@ void windowsFile::createFile() HANDLE hFile = CreateFile( m_nativePath.c_str(), GENERIC_WRITE, - 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, @@ -260,7 +260,7 @@ bool windowsFile::canWrite() const HANDLE hFile = CreateFile( m_nativePath.c_str(), GENERIC_WRITE, - 0, + FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, @@ -435,7 +435,7 @@ ref windowsFileReader::getInputStream() HANDLE hFile = CreateFile( m_nativePath.c_str(), GENERIC_READ, - 0, + FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, @@ -510,7 +510,7 @@ ref windowsFileWriter::getOutputStream() HANDLE hFile = CreateFile( m_nativePath.c_str(), GENERIC_WRITE, - 0, + FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,