diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2016-02-12 11:56:16 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:22:42 +0300 |
commit | 28681d7f20442f812280215d7d7ef74087b2f188 (patch) | |
tree | b9d9bc171a03d77591ed51c9a586d89fe6628b49 /platform | |
parent | 828ac897f0ba9126b66603d287b78633b279dcbc (diff) |
[new downloader][MAPSME-89] Fix existing check
Diffstat (limited to 'platform')
-rw-r--r-- | platform/http_request.cpp | 6 |
1 files 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), ()); |