Changeset 68
- Timestamp:
- 12/27/05 14:14:42 (3 years ago)
- Files:
-
- trunk/Libs/SSHKeychain.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Libs/SSHKeychain.m
r41 r68 249 249 - (BOOL)addKeysToAgentWithInteraction:(BOOL)interaction 250 250 { 251 NSMutableArray *paths; 251 NSMutableArray *paths = [NSMutableArray array]; 252 NSString *path; 253 NSEnumerator *e; 252 254 SSHTool *theTool; 253 int i, ts; 254 255 paths = [[self arrayOfPaths] mutableCopy]; 255 int ts; 256 256 257 257 if([self addingKeys]) … … 265 265 } 266 266 267 for(i=0; i < [paths count]; i++) {268 if([[NSFileManager defaultManager] isReadableFileAtPath:[paths objectAtIndex:i]] == NO) {269 [paths removeObjectAtIndex:i];270 i--;271 }267 e = [[self arrayOfPaths] objectEnumerator]; 268 while (path = [e nextObject]) 269 { 270 if ([[NSFileManager defaultManager] isReadableFileAtPath:path]) 271 [paths addObject:path]; 272 272 } 273 273 … … 283 283 theTool = [SSHTool toolWithName:@"ssh-add"]; 284 284 285 /* Set the SSH_ASKPASS + DISPLAY environment variables, so the tool can ask for a passphrase. */285 /* Set the SSH_ASKPASS + DISPLAY environment variables, so the tool can ask for a passphrase. */ 286 286 [theTool setEnvironmentVariable:@"SSH_ASKPASS" withValue: 287 287 [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"PassphraseRequester"]];
