From d56a15db83ce83c825e3645bcba6727dd086b441 Mon Sep 17 00:00:00 2001 From: Richard van Zon Date: Mon, 9 Apr 2012 08:06:53 +0200 Subject: [PATCH] Using fm instance and ignore errors --- Tools/XcodeCapp/TNXCodeCapp.m | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index b1b7d2dda..43faf874e 100644 --- a/Tools/XcodeCapp/TNXCodeCapp.m +++ b/Tools/XcodeCapp/TNXCodeCapp.m @@ -144,18 +144,15 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification } // add symlinked directories - NSFileManager *fileManager = [NSFileManager defaultManager]; - NSError *error; - - NSArray *fileList = [fileManager contentsOfDirectoryAtPath:aPath error:&error]; + NSArray *fileList = [fm contentsOfDirectoryAtPath:aPath error:nil]; for (NSString *node in fileList) { - NSDictionary *attributes = [fileManager attributesOfItemAtPath:aPath error:&error]; + NSDictionary *attributes = [fm attributesOfItemAtPath:aPath error:nil]; if ([[attributes objectForKey:@"NSFileType"] isEqualTo:NSFileTypeDirectory]) { NSString *subDirectoryPath = [aPath stringByAppendingPathComponent:node]; - NSString *symlinkDestination = [fileManager destinationOfSymbolicLinkAtPath:subDirectoryPath error:&error]; + NSString *symlinkDestination = [fm destinationOfSymbolicLinkAtPath:subDirectoryPath error:nil]; if (symlinkDestination) { [pathsToWatch addObject:subDirectoryPath];