Changeset 904

Show
Ignore:
Timestamp:
05/26/08 13:58:12 (6 months ago)
Author:
astrange
Message:

Copy r903 from trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/perian-1.1/CPFPerianPrefPaneController.m

    r685 r904  
    647647        NSDictionary *infoDict = [self myInfoDict]; 
    648648        NSDictionary *myComponentsInfo = [infoDict objectForKey:ComponentInfoDictionaryKey]; 
     649        NSFileManager *fileManager = [NSFileManager defaultManager]; 
     650        NSString *componentPath; 
    649651 
    650652        [errorString release]; 
     
    656658         
    657659        int tag = 0; 
    658         BOOL result = NO
     660        componentPath = [[self quickTimeComponentDir:userInstalled] stringByAppendingPathComponent:@"Perian.component"]
    659661        if(auth != nil && !userInstalled) 
    660                 [self _authenticatedRemove:[[self quickTimeComponentDir:userInstalled] stringByAppendingPathComponent:@"Perian.component"]]; 
    661         else 
    662                 result = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[self quickTimeComponentDir:userInstalled] destination:@"" files:[NSArray arrayWithObject:@"Perian.component"] tag:&tag]; 
     662                [self _authenticatedRemove:componentPath]; 
     663        else 
     664                [fileManager removeFileAtPath:componentPath handler:nil]; 
    663665         
    664666        NSEnumerator *componentEnum = [myComponentsInfo objectEnumerator]; 
     
    668670                ComponentType type = [[myComponent objectForKey:ComponentTypeKey] intValue]; 
    669671                NSString *directory = [self basePathForType:type user:userInstalled]; 
     672                componentPath = [directory stringByAppendingPathComponent:[myComponent objectForKey:ComponentNameKey]]; 
    670673                if(auth != nil && !userInstalled) 
    671                         [self _authenticatedRemove:[directory stringByAppendingPathComponent:[myComponent objectForKey:ComponentNameKey]]]; 
     674                        [self _authenticatedRemove:componentPath]; 
    672675                else 
    673                         result = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:directory destination:@"" files:[NSArray arrayWithObject:[myComponent objectForKey:ComponentNameKey]] tag:&tag]; 
     676                        [fileManager removeFileAtPath:componentPath handler:nil]; 
    674677        } 
    675678        if(auth != nil)