diff options
| -rw-r--r-- | source/core/slang-stream.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/core/slang-stream.cpp b/source/core/slang-stream.cpp index 07c7e858c..a6ddfe1e9 100644 --- a/source/core/slang-stream.cpp +++ b/source/core/slang-stream.cpp @@ -162,10 +162,15 @@ SlangResult FileStream::_init( SLANG_ASSERT(!"Invalid file share mode."); return SLANG_FAIL; } + if (share == FileShare::None) - _wfopen_s(&m_handle, fileName.toWString(), wideMode); + { + m_handle = _wfsopen(fileName.toWString(), wideMode, _SH_DENYNO); + } else + { m_handle = _wfsopen(fileName.toWString(), wideMode, shFlag); + } #else m_handle = fopen(fileName.getBuffer(), mode); #endif |
