fix another problem with space in name that prevent launching XCode on the shadow project

This commit is contained in:
Antoine Mercadal committed 2011-07-01 18:28:00 +02:00
1 parent b5bb9c8ec3
commit 1f479c3f20
1 file changed
+9 -2
+9 -2
View File
@@ -304,7 +304,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
options:NSCaseInsensitiveSearch
range:NSMakeRange(0, [PBXContent length])];
[PBXContent replaceOccurrencesOfString:@"${CappuccinoProjectRelativePath}"
withString:[currentProjectURL path]
withString:@".."
options:NSCaseInsensitiveSearch
range:NSMakeRange(0, [PBXContent length])];
@@ -436,8 +436,14 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
[spinner startAnimation:nil];
currentProjectURL = [[openPanel URLs] objectAtIndex:0];
currentProjectName = [[[openPanel URLs] objectAtIndex:0] lastPathComponent];
NSMutableString *tempName = [NSMutableString stringWithString:[[[openPanel URLs] objectAtIndex:0] lastPathComponent]];
[tempName replaceOccurrencesOfString:@" "
withString:@"_"
options:NSCaseInsensitiveSearch
range:NSMakeRange(0, [tempName length])];
currentProjectName = [NSString stringWithString:tempName];
[self computeIgnoredPaths];
[self initializeEventStreamWithPath:[currentProjectURL path]];
@@ -481,6 +487,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
if (!currentProjectURL)
return;
NSLog(@"Open Xcode project at URL : '%@'", [XCodeSupportProject path]);
system([[NSString stringWithFormat:@"open \"%@\"", [XCodeSupportProject path]] UTF8String]);
}