From a6f12e754e7498cec962e0281c8401c5637aa654 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 6 Jun 2011 22:21:32 +0000 Subject: - Fix saving .spf documents without SSH key locations stored, addressing exceptions when re-saving old .spf files --- Source/SPDatabaseDocument.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 20379ede..bb2846c7 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4123,7 +4123,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; -- cgit v1.2.3