Merge pull request #353 from sub0ne/master

Bug #352: MacPass not opening when DB is remembered but missing:
This commit is contained in:
Michael Starke
2015-07-14 13:28:29 +02:00
6 changed files with 16 additions and 1 deletions

View File

@@ -273,7 +273,22 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
if(isFileURL) {
[documentController openDocumentWithContentsOfURL:documentUrl
display:YES
completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error) {}];
completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error) {
if(error != nil){
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText: NSLocalizedString(@"FILE_OPEN_ERROR", nil)];
[alert setInformativeText: [error localizedDescription]];
[alert setAlertStyle:NSCriticalAlertStyle ];
[alert runModal];
}
if(document == nil){
[self _showWelcomeWindow];
}
}];
}
return isFileURL;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.