diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/stream/strmwnt.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 3c629b1b9cba..c0c5373573e2 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -276,7 +276,6 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode ) m_eStreamMode &= ~StreamMode::TRUNC; // don't truncate on reopen aFilename = aParsedFilename; - OString aFileNameA(OUStringToOString(aFilename, osl_getThreadTextEncoding())); SetLastError( ERROR_SUCCESS ); // might be changed by Redirector DWORD nOpenAction; @@ -317,8 +316,8 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode ) nOpenAction = OPEN_EXISTING; } - pInstanceData->hFile = CreateFile( - aFileNameA.getStr(), + pInstanceData->hFile = CreateFileW( + SAL_W(aFilename.getStr()), nAccessMode, nShareMode, nullptr, @@ -351,8 +350,8 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode ) // if Openaction is CREATE_ALWAYS nOpenAction = OPEN_EXISTING; SetLastError( ERROR_SUCCESS ); - pInstanceData->hFile = CreateFile( - aFileNameA.getStr(), + pInstanceData->hFile = CreateFileW( + SAL_W(aFilename.getStr()), GENERIC_READ, nShareMode, nullptr, |