From aee5bc25beb877fb6484031c087b4f93096394eb Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sun, 14 Aug 2011 14:45:25 +0000 Subject: - Review changes made in r3376 and revert a number of regressions --- Source/SPDatabaseDocument.m | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Source/SPDatabaseDocument.m') diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 308826e0..237b8d85 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4147,7 +4147,8 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [connection setObject:[connectionController sshHost] forKey:@"ssh_host"]; [connection setObject:[connectionController sshUser] forKey:@"ssh_user"]; [connection setObject:[NSNumber numberWithInt:[connectionController sshKeyLocationEnabled]] forKey:@"ssh_keyLocationEnabled"]; - [connection setObject:[connectionController sshKeyLocation] forKey:@"ssh_keyLocation"]; + if ([connectionController sshKeyLocation]) + [connection setObject:[connectionController sshKeyLocation] forKey:@"ssh_keyLocation"]; if ([connectionController sshPort] && [[connectionController sshPort] length]) [connection setObject:[NSNumber numberWithInteger:[[connectionController sshPort] integerValue]] forKey:@"ssh_port"]; break; @@ -4167,11 +4168,8 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if (includePasswords) { NSString *pw = [self keychainPasswordForConnection:nil]; - if (![pw length]) pw = [connectionController password]; - if (pw) - [connection setObject:pw forKey:@"password"]; - else - [connection setObject:@"" forKey:@"password"]; + if (!pw) pw = [connectionController password]; + if (pw) [connection setObject:pw forKey:@"password"]; if ([connectionController type] == SPSSHTunnelConnection) { NSString *sshpw = [self keychainPasswordForSSHConnection:nil]; -- cgit v1.2.3