Changeset 86930 for contrib/Pallet
- Timestamp:
- Nov 7, 2011, 7:53:28 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/Pallet/MPActionsController.m
r72223 r86930 314 314 NSString *pkgPath = [defaults objectForKey:@"PKGPath"]; 315 315 if (pkgPath == nil) { 316 [self openPreferences:self]; 316 NSFileManager *fileManager = [NSFileManager defaultManager]; 317 BOOL existsAsDirectory = NO; 318 BOOL containsMacPortsTcl = NO; 319 NSString *macportsDir; 320 NSString *macportsFile; 321 macportsDir = [[MPMacPorts PKGPath] stringByAppendingPathComponent:@"macports1.0"]; 322 macportsFile = [macportsDir stringByAppendingPathComponent:@"macports.tcl"]; 323 [fileManager fileExistsAtPath:macportsDir isDirectory:&existsAsDirectory]; 324 if (existsAsDirectory) { 325 containsMacPortsTcl = [fileManager fileExistsAtPath:macportsFile isDirectory:nil]; 326 } 327 if (containsMacPortsTcl) { 328 [defaults setObject:[MPMacPorts PKGPath] forKey:@"PKGPath"]; 329 [[MPActionLauncher sharedInstance] 330 performSelectorInBackground:@selector(loadPorts) withObject:nil]; 331 } else { 332 [self openPreferences:self]; 333 } 317 334 } else { 318 335 [MPMacPorts setPKGPath:pkgPath];
Note: See TracChangeset
for help on using the changeset viewer.