Fixed: Frameworks/Source was being ignored during directory scans.

Formatting tweaks also.
This commit is contained in:
Aparajita Fishman
2013-05-07 19:00:55 -04:00
parent 1e828b2e8d
commit 218eed7e97
2 changed files with 15 additions and 7 deletions
@@ -57,9 +57,9 @@ NSString * const XCCNeedSourceToProjectPathMappingNotification = @"XCCNeedSource
NSFileManager *fm = [NSFileManager defaultManager];
NSArray *urls = [fm contentsOfDirectoryAtURL:[NSURL fileURLWithPath:projectPath.stringByResolvingSymlinksInPath]
includingPropertiesForKeys:@[NSURLIsDirectoryKey, NSURLIsSymbolicLinkKey]
options:NSDirectoryEnumerationSkipsHiddenFiles | NSDirectoryEnumerationSkipsPackageDescendants | NSDirectoryEnumerationSkipsSubdirectoryDescendants
error:&error];
includingPropertiesForKeys:@[NSURLIsDirectoryKey, NSURLIsSymbolicLinkKey]
options:NSDirectoryEnumerationSkipsHiddenFiles | NSDirectoryEnumerationSkipsPackageDescendants | NSDirectoryEnumerationSkipsSubdirectoryDescendants
error:&error];
if (!urls)
return;
@@ -98,7 +98,10 @@ NSString * const XCCNeedSourceToProjectPathMappingNotification = @"XCCNeedSource
if (isDirectory.boolValue == YES)
{
if ([self.xcc shouldIgnoreDirectoryNamed:filename])
{
DDLogVerbose(@"ignored symlinked directory: %@", projectRelativePath);
continue;
}
// If the resolved path is not within the project directory and is not ignored, add a mapping to it
// so we can map the resolved path back to the project directory later.
@@ -108,18 +111,22 @@ NSString * const XCCNeedSourceToProjectPathMappingNotification = @"XCCNeedSource
if (![realPath hasPrefix:fullProjectPath] && ![self.xcc pathMatchesIgnoredPaths:fullProjectPath])
{
DDLogVerbose(@"symlinked directory: %@ -> %@", projectRelativePath, realPath);
NSDictionary *info =
@{
@"projectId":self.projectId,
@"sourcePath":realPath,
@"projectPath":fullProjectPath
@"projectId":self.projectId,
@"sourcePath":realPath,
@"projectPath":fullProjectPath
};
if (self.isCancelled)
return;
[center postNotificationName:XCCNeedSourceToProjectPathMappingNotification object:self userInfo:info];
}
else
DDLogVerbose(@"ignored symlinked directory: %@", projectRelativePath);
}
[self findSourceFilesAtProjectPath:projectRelativePath];
+1
View File
@@ -171,6 +171,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
NSArray *defaultIgnoredPaths = @[
@"*/Frameworks/",
@"!*/Frameworks/Debug/",
@"!*/Frameworks/Source/",
@"*/AppKit/",
@"*/Foundation/",
@"*/Objective-J/",