Skip to content

Commit

Permalink
Merge pull request #657 from couchbase/feature/issue_649_mapped_file
Browse files Browse the repository at this point in the history
Remove NSDataReadingMappedIfSafe when reading attachment content
  • Loading branch information
snej committed Apr 14, 2015
2 parents 02eb6f6 + c073243 commit 4cf8324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/API/CBLAttachment.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ - (NSData*) content {
return _body;
else if ([_body isKindOfClass: [NSURL class]] && [_body isFileURL]) {
return [NSData dataWithContentsOfURL: _body
options: NSDataReadingMappedIfSafe | NSDataReadingUncached
options: NSDataReadingUncached
error: nil];
}
return nil;
Expand Down
3 changes: 1 addition & 2 deletions Source/CBL_BlobStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ - (BOOL) hasBlobForKey: (CBLBlobKey)key {

- (NSData*) blobForKey: (CBLBlobKey)key {
NSString* path = [self rawPathForKey: key];
NSData* blob = [NSData dataWithContentsOfFile: path options: NSDataReadingMappedIfSafe
error: NULL];
NSData* blob = [NSData dataWithContentsOfFile: path options: NSDataReadingUncached error: NULL];
if (_encryptionKey && blob) {
blob = [_encryptionKey decryptData: blob];
CBLBlobKey decodedKey = [[self class] keyForBlob: blob];
Expand Down

0 comments on commit 4cf8324

Please sign in to comment.