Delete destination file in downloader on success before renaming.

This commit is contained in:
vng 2012-06-20 19:51:05 -07:00 committed by Alex Zolotarev
parent 66b7991091
commit 211430071d

View file

@ -193,6 +193,7 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback
my::DeleteFileX(m_filePath + RESUME_FILE_EXTENSION);
// Rename finished file to it's original name.
my::DeleteFileX(m_filePath);
CHECK(my::RenameFileX(m_filePath + DOWNLOADING_FILE_EXTENSION, m_filePath), ());
DisableBackupForFile(m_filePath);