Fix bug 54475 (problem with opening locked file)

This commit is contained in:
Oleg Korshul
2021-12-10 11:12:27 +03:00
parent 2e83d4e9c8
commit 2cd312f396

View File

@ -1195,7 +1195,7 @@ namespace NSFile
{
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
FILE* pFile = NULL;
if ( 0 != _wfopen_s( &pFile, strFileName.c_str(), L"rb"))
if ( NULL == (pFile = _wfsopen( strFileName.c_str(), L"rb", _SH_DENYNO)))
return false;
#else
BYTE* pUtf8 = NULL;