Changeset 550 for trunk/Cocoa


Ignore:
Timestamp:
07/18/09 05:59:10 (15 years ago)
Author:
Nicholas Riley
Message:

Resolving fake AliasHandles always returns paramErr; don't ever create them.

Fixes problems uniqueing media items (aliases were always comparing unequal).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/BDAlias.m

    r53 r550  
    317317- (BOOL)aliasDataIsEqual:(NSData *)data;
    318318{
    319     AliasHandle otherAlias;
    320     const UInt8 *aliasPtr = CFDataGetBytePtr((CFDataRef)data);
    321319    BOOL result;
    322     if (aliasPtr == NULL) {
    323         otherAlias = (AliasHandle)DataToHandle((CFDataRef)data);
    324     } else {
    325         otherAlias = (AliasHandle)&aliasPtr;
    326     }
     320    AliasHandle otherAlias = (AliasHandle)DataToHandle((CFDataRef)data);
    327321    result = [self aliasIsEqual: otherAlias];
    328     if (aliasPtr == NULL) DisposeHandle((Handle)otherAlias);
     322    DisposeHandle((Handle)otherAlias);
    329323    return result;
    330324}
Note: See TracChangeset for help on using the changeset viewer.