Permalink
Browse files

https://redmine.purplemotion.com/issues/1422 - adjusted is complete c…

…heck - refs #1422
  • Loading branch information...
1 parent 20c3bfa commit 695c8173ae2befec2aad5fb1557d9d64fdcccd6a @clausweymann clausweymann committed Apr 10, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/shared/AFCacheableItem.m
@@ -946,7 +946,8 @@ - (int)tag {
- (BOOL)isComplete {
//[[NSString alloc] initWithFormat:@"Item %@ has %lld of %lld data loaded, complete ? %d", self.info.filename, self.info.actualLength, self.info.contentLength,(self.currentContentLength >= self.info.contentLength)];
- return (self.info.actualLength >= self.info.contentLength)?YES:NO;
+ //assumed complete if there is data and the actual data length is at least as big as the expected content length. (should be exactly the expected content length but sometimes there is no expected content lenght present; self.info.contentLenght = 0)
+ return [self isDataLoaded] && (self.info.actualLength >= self.info.contentLength);
}
- (BOOL)isDataLoaded

0 comments on commit 695c817

Please sign in to comment.