diff options
author | rowanbeentje <rowan@beent.je> | 2011-08-14 14:45:25 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-08-14 14:45:25 +0000 |
commit | aee5bc25beb877fb6484031c087b4f93096394eb (patch) | |
tree | b28856cc4bba76c8b6de5f64b398ae2f4822bef5 /Source/SPDatabaseDocument.m | |
parent | 8fa65d0924287314ae74948698ecba9d978a7612 (diff) | |
download | sequelpro-aee5bc25beb877fb6484031c087b4f93096394eb.tar.gz sequelpro-aee5bc25beb877fb6484031c087b4f93096394eb.tar.bz2 sequelpro-aee5bc25beb877fb6484031c087b4f93096394eb.zip |
- Review changes made in r3376 and revert a number of regressions
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 10 |
1 files changed, 4 insertions, 6 deletions
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]; |