From 28681d7f20442f812280215d7d7ef74087b2f188 Mon Sep 17 00:00:00 2001 From: Sergey Yershov Date: Fri, 12 Feb 2016 11:56:16 +0300 Subject: [PATCH] [new downloader][MAPSME-89] Fix existing check --- platform/http_request.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/http_request.cpp b/platform/http_request.cpp index 4afdbcffc5..9b4dcc48ad 100644 --- a/platform/http_request.cpp +++ b/platform/http_request.cpp @@ -1,6 +1,7 @@ -#include "platform/http_request.hpp" #include "platform/chunks_download_strategy.hpp" +#include "platform/http_request.hpp" #include "platform/http_thread_callback.hpp" +#include "platform/platform.hpp" #include "defines.hpp" @@ -277,8 +278,7 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback (void)my::DeleteFileX(m_filePath + RESUME_FILE_EXTENSION); // Rename finished file to it's original name. - uint64_t sz = 0; - if (my::GetFileSize(m_filePath, sz)) + if (Platform::IsFileExistsByFullPath(m_filePath)) (void)my::DeleteFileX(m_filePath); CHECK(my::RenameFileX(m_filePath + DOWNLOADING_FILE_EXTENSION, m_filePath), ());