Skip to content

Commit

Permalink
Remove NSDataReadingMappedIfSafe from CBL_BlobStore.blobForKey
Browse files Browse the repository at this point in the history
Remove NSDataReadingMappedIfSafe and use NSDataReadingUncached option when reading blob data for a key.

#649
  • Loading branch information
pasin committed Apr 14, 2015
1 parent d7f0855 commit c073243
Showing 1 changed file with 1 addition and 2 deletions.
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 c073243

Please sign in to comment.