diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-22 12:06:07 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:57:50 +0300 |
commit | ce1d37afad400eba156998e12617d2c49c1195d8 (patch) | |
tree | 74c7929e8ed9e70183d8f2339e5f1636cbfb050f /platform | |
parent | 8c49302db73edf9c57544bc5e1b252cd0990d43a (diff) |
[new downloader] Fix error processing when device storage is full
Diffstat (limited to 'platform')
-rw-r--r-- | platform/http_request.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/platform/http_request.cpp b/platform/http_request.cpp index 9b4dcc48ad..b9adf31573 100644 --- a/platform/http_request.cpp +++ b/platform/http_request.cpp @@ -396,22 +396,6 @@ HttpRequest * HttpRequest::PostJson(string const & url, string const & postData, return new MemoryHttpRequest(url, postData, onFinish, onProgress); } -namespace -{ - class ErrorHttpRequest : public HttpRequest - { - string m_filePath; - public: - ErrorHttpRequest(string const & filePath) - : HttpRequest(CallbackT(), CallbackT()), m_filePath(filePath) - { - m_status = EFailed; - } - - virtual string const & Data() const { return m_filePath; } - }; -} - HttpRequest * HttpRequest::GetFile(vector<string> const & urls, string const & filePath, int64_t fileSize, CallbackT const & onFinish, CallbackT const & onProgress, @@ -425,13 +409,8 @@ HttpRequest * HttpRequest::GetFile(vector<string> const & urls, { // Can't create or open file for writing. LOG(LWARNING, ("Can't create file", filePath, "with size", fileSize, e.Msg())); - - // Mark the end of download with error. - ErrorHttpRequest error(filePath); - onFinish(error); - - return 0; } + return nullptr; } } // namespace downloader |