Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Yershov <yershov@corp.mail.ru>2016-03-01 16:02:08 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:50:44 +0300
commit06e7b8cd9beeeec939a8d46cc1223fc2e272080b (patch)
tree6ea3e19a50574a7236f631e9cf2654364ec0c552 /platform
parent4e879b28da332d5e0c50bf297e46ef207198c99e (diff)
Raise error if no space left on device
Diffstat (limited to 'platform')
-rw-r--r--platform/http_thread_apple.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/http_thread_apple.mm b/platform/http_thread_apple.mm
index a3ed5e102c..5f6f54e208 100644
--- a/platform/http_thread_apple.mm
+++ b/platform/http_thread_apple.mm
@@ -188,7 +188,11 @@ static id<DownloadIndicatorProtocol> downloadIndicator = nil;
UNUSED_VALUE(connection);
int64_t const length = [data length];
m_downloadedBytes += length;
- m_callback->OnWrite(m_begRange + m_downloadedBytes - length, [data bytes], length);
+ if(!m_callback->OnWrite(m_begRange + m_downloadedBytes - length, [data bytes], length))
+ {
+ [m_connection cancel];
+ m_callback->OnFinish(-1, m_begRange, m_endRange);
+ }
}
- (void) connection:(NSURLConnection *)connection didFailWithError:(NSError *)error