mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 02:40:59 +00:00
Using fm instance and ignore errors
This commit is contained in:
1 parent
ee190d07c5
commit
d56a15db83
1 file changed
+3
-6
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user