From 211430071df431f03b559833446c3eda873f3113 Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 20 Jun 2012 19:51:05 -0700 Subject: [PATCH] Delete destination file in downloader on success before renaming. --- platform/http_request.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/http_request.cpp b/platform/http_request.cpp index dd68ee3bf7..53f383db39 100644 --- a/platform/http_request.cpp +++ b/platform/http_request.cpp @@ -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);