mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fix server crash when nvault is writting to journal file without write permission (bug 3231, r=Arkshine)
Former-commit-id: 6ad9e6bc8c
This commit is contained in:
parent
bf395c8ac1
commit
15572e2d61
@ -129,7 +129,9 @@ bool Journal::Begin()
|
||||
|
||||
bool Journal::End()
|
||||
{
|
||||
if (m_fp)
|
||||
fclose(m_fp);
|
||||
|
||||
m_Bw.SetFilePtr(NULL);
|
||||
return true;
|
||||
}
|
||||
|
@ -266,8 +266,13 @@ bool NVault::Close()
|
||||
return false;
|
||||
|
||||
_SaveToFile();
|
||||
|
||||
if (m_Journal)
|
||||
{
|
||||
m_Journal->End();
|
||||
m_Journal->Erase();
|
||||
}
|
||||
|
||||
m_Open = false;
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user