also remove incomplete map when restarting download

(cherry picked from commit b67b55448a)
This commit is contained in:
Robert Müller 2020-04-13 23:23:05 +02:00 committed by ChillerDragon
parent 2e31cf3258
commit 4ba3d206a0

View file

@ -457,7 +457,10 @@ void CClient::SendReady()
void CClient::SendMapRequest()
{
if(m_MapdownloadFile)
{
io_close(m_MapdownloadFile);
Storage()->RemoveFile(m_aMapdownloadFilename, IStorage::TYPE_SAVE);
}
m_MapdownloadFile = Storage()->OpenFile(m_aMapdownloadFilename, IOFLAG_WRITE, IStorage::TYPE_SAVE);
CMsgPacker Msg(NETMSG_REQUEST_MAP_DATA, true);
Msg.AddInt(m_MapdownloadChunk);