Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Allow CBL 1.1 to open "cblite2" databases (for ForestDB)
Browse files Browse the repository at this point in the history
ForestDB databases in CBL 1.1 use the cblite2 extension, so allow it.
  • Loading branch information
snej committed Oct 20, 2015
1 parent 8fd0050 commit 4e5de58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/DBDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "DBDocument.h"
#import "DBWindowController.h"
#import <CouchbaseLite/CouchbaseLite.h>


@implementation DBDocument
Expand Down Expand Up @@ -48,8 +49,8 @@ - (BOOL)readFromURL:(NSURL *)absoluteURL

BOOL supportsNewFormat = CBLVersion().doubleValue >= 1.2;
BOOL isNewFormat = [extension isEqualToString: @"cblite2"];
if (isNewFormat != supportsNewFormat) {
return returnErrorWithMessage(@"This database is too old or too new to be opened by this app.", outError);
if (isNewFormat < supportsNewFormat) {
return returnErrorWithMessage(@"This database is too old to be opened by this app.", outError);
}

NSString* serverPath = _path.stringByDeletingLastPathComponent;
Expand Down

0 comments on commit 4e5de58

Please sign in to comment.