From 94737bf6bf471503c166654581a79b3ca51734e6 Mon Sep 17 00:00:00 2001 From: Artyom Polkovnikov Date: Wed, 31 Dec 2014 13:34:37 +0300 Subject: [PATCH] [coding] Remove file mapping name from file container mapping in Windows, as it caused exceptions. --- coding/file_container.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coding/file_container.cpp b/coding/file_container.cpp index 9088f29ee5..b3c5892bfa 100644 --- a/coding/file_container.cpp +++ b/coding/file_container.cpp @@ -140,7 +140,7 @@ void FilesMappingContainer::Open(string const & fName) m_hFile = CreateFileA(fName.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL); if (m_hFile == INVALID_HANDLE_VALUE) MYTHROW(Reader::OpenException, ("Can't open file:", fName, "win last error:", GetLastError())); - m_hMapping = CreateFileMappingA(m_hFile, NULL, PAGE_READONLY, 0, 0, fName.c_str()); + m_hMapping = CreateFileMappingA(m_hFile, NULL, PAGE_READONLY, 0, 0, NULL); if (m_hMapping == NULL) MYTHROW(Reader::OpenException, ("Can't create file's Windows mapping:", fName, "win last error:", GetLastError())); #else