only close file handle once in MMapFile::clear()
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3686 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a0b6163f51
commit
7411f18a9b
1 changed files with 4 additions and 1 deletions
|
@ -527,13 +527,16 @@ class MMapFile : public IMMap
|
|||
#ifdef _WIN32
|
||||
if (m_hFileMap)
|
||||
CloseHandle(m_hFileMap);
|
||||
if (m_bTempHandle && m_hFile)
|
||||
if (m_bTempHandle && m_hFile != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(m_hFile);
|
||||
|
||||
m_hFile = INVALID_HANDLE_VALUE;
|
||||
m_hFileMap = 0;
|
||||
#else
|
||||
if (m_bTempHandle && m_hFile)
|
||||
fclose(m_hFile);
|
||||
|
||||
m_hFile = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue