mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
Merge pull request #353 from sub0ne/master
Bug #352: MacPass not opening when DB is remembered but missing:
This commit is contained in:
@@ -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.
Binary file not shown.
Reference in New Issue
Block a user