mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-18 20:49:26 +00:00
Fixed Tests
Fixed error that lead to trying to create and array with nil object
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
MPDocument *document = [windowController document];
|
||||
if(document) {
|
||||
BOOL isOk = NO;
|
||||
if(document.isDecrypted) {
|
||||
if(document.decrypted) {
|
||||
// TODO: Fix unlocking to actually test
|
||||
BOOL noPassword = !document.password && [[self.passwordTextField stringValue] length] == 0;
|
||||
BOOL passwordOk = [document.password isEqualToString:[self.passwordTextField stringValue]];
|
||||
@@ -69,7 +69,7 @@
|
||||
isOk = (noPassword || passwordOk) && (noKey || keyOk);
|
||||
}
|
||||
else {
|
||||
isOk = [document decryptWithPassword:[self.passwordTextField stringValue] keyFileURL:[self.keyPathControl URL]];
|
||||
isOk = [document unlockWithPassword:[self.passwordTextField stringValue] keyFileURL:[self.keyPathControl URL]];
|
||||
}
|
||||
if(!isOk) {
|
||||
[self _showError];
|
||||
|
||||
Reference in New Issue
Block a user