On 8 Jan 2008, at 6:35 PM, Adam R. Maxwell wrote:

>
> On Tuesday, January 08, 2008, at 09:26AM, "Christiaan Hofman"  
> <[EMAIL PROTECTED]> wrote:
>> No, you disabled that yourself, and added a remark about it ;-)
>
> Oops...where did I do that?  Obviously I should start reading my  
> own comments instead of sleeping through them :).   
> FSResolveAliasFileWithMountFlags is supposed to resolve anything  
> that's resolvable, so even though it returns false for wasAliased  
> we shouldn't need to do anything further.
>

sure, the FSRef is resolved, but it's not used to create a URL, and  
that's what in the end is used.

Christiaan

>>
>> Christiaan
>>
>> On 8 Jan 2008, at 6:13 PM, Adam R. Maxwell wrote:
>>
>>> Aren't symlinks resolved in the init method by calling
>>> _shouldDrawBadgeForURL?  That was the intent...
>>>
>>> On Tuesday, January 08, 2008, at 09:08AM, "Christiaan Hofman"
>>> <[EMAIL PROTECTED]> wrote:
>>>> This is not guaranteed, as symlinks are not resolved. So why should
>>>> we actually not resolve symlinks, we already did the hard part.
>>>>
>>>> Christiaan
>>>>
>>>> On 8 Jan 2008, at 5:54 PM, [EMAIL PROTECTED] wrote:
>>>>
>>>>> Revision: 12363
>>>>>           http://bibdesk.svn.sourceforge.net/bibdesk/?
>>>>> rev=12363&view=rev
>>>>> Author:   amaxwell
>>>>> Date:     2008-01-08 08:54:35 -0800 (Tue, 08 Jan 2008)
>>>>>
>>>>> Log Message:
>>>>> -----------
>>>>> URL is already pointing to the target file, so shouldn't need  
>>>>> to be
>>>>> resolved again.  Release UTI.
>>>>>
>>>>> Modified Paths:
>>>>> --------------
>>>>>     trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
>>>>>
>>>>> Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
>>>>> ================================================================== 
>>>>> =
>>>>> --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m        
>>>>> 2008-01-08 16:53:23 UTC (rev 12362)
>>>>> +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m        
>>>>> 2008-01-08 16:54:35 UTC (rev 12363)
>>>>> @@ -268,29 +268,18 @@
>>>>>      OSStatus err = noErr;
>>>>>      CFStringRef theUTI = NULL;
>>>>>
>>>>> -    // convert to an FSRef, to get the UTI of the actual URL
>>>>> +    // convert to an FSRef; _fileURL is guaranteed not to be an
>>>>> alias or symlink
>>>>>      const UInt8 *fsPath = (void *)[[_fileURL path] UTF8String];
>>>>>      err = FSPathMakeRef(fsPath, &fileRef, NULL);
>>>>>
>>>>>      // kLSItemContentType returns a CFStringRef, according to the
>>>>> header
>>>>>      if (noErr == err)
>>>>>          err = LSCopyItemAttribute(&fileRef, kLSRolesAll,
>>>>> kLSItemContentType, (CFTypeRef *)&theUTI);
>>>>> -
>>>>> -    // For a link/alias, get the target's UTI in order to
>>>>> determine which concrete subclass to create.  Subclasses that are
>>>>> file-based need to check the URL to see if it should be badged
>>>>> using _shouldDrawBadgeForURL, and then call _resolvedURLWithURL in
>>>>> order to actually load the file's content.
>>>>>
>>>>> -    // aliases and symlinks are kUTTypeResolvable, so the alias
>>>>> manager should handle either of them
>>>>> -    if (NULL != theUTI && UTTypeConformsTo(theUTI,
>>>>> kUTTypeResolvable)) {
>>>>> -        Boolean isFolder, wasAliased;
>>>>> -        err = FSResolveAliasFileWithMountFlags(&fileRef, TRUE,
>>>>> &isFolder, &wasAliased, kARMNoUI);
>>>>> -        // don't change the UTI if it couldn't be resolved; in
>>>>> that case, we should just show a finder icon
>>>>> -        if (noErr == err) {
>>>>> -            CFRelease(theUTI);
>>>>> -            theUTI = NULL;
>>>>> -            err = LSCopyItemAttribute(&fileRef, kLSRolesAll,
>>>>> kLSItemContentType, (CFTypeRef *)&theUTI);
>>>>> -        }
>>>>> -    }
>>>>> +    BOOL isHTML = (NULL != theUTI && UTTypeConformsTo(theUTI,
>>>>> kUTTypeHTML));
>>>>> +    if (theUTI) CFRelease(theUTI);
>>>>>
>>>>> -    return NULL != theUTI && UTTypeConformsTo(theUTI,  
>>>>> kUTTypeHTML);
>>>>> +    return isHTML;
>>>>>  }
>>>>>
>>>>>  - (void)_loadHTML:(NSMutableDictionary *)HTMLDict {
>>>>>
>>>>>
>>>>> This was sent by the SourceForge.net collaborative development
>>>>> platform, the world's largest Open Source development site.
>>>>>
>>>>> ------------------------------------------------------------------ 
>>>>> --
>>>>> --
>>>>> ---
>>>>> Check out the new SourceForge.net Marketplace.
>>>>> It's the best place to buy or sell services for
>>>>> just about anything Open Source.
>>>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/
>>>>> marketplace
>>>>> _______________________________________________
>>>>> Bibdesk-commit mailing list
>>>>> [EMAIL PROTECTED]
>>>>> https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
>>>>
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> ----
>>>> Check out the new SourceForge.net Marketplace.
>>>> It's the best place to buy or sell services for
>>>> just about anything Open Source.
>>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/
>>>> marketplace
>>>> _______________________________________________
>>>> Bibdesk-develop mailing list
>>>> Bibdesk-develop@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
>>>>
>>>>
>>>
>>> -------------------------------------------------------------------- 
>>> --
>>> ---
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/
>>> marketplace
>>> _______________________________________________
>>> Bibdesk-develop mailing list
>>> Bibdesk-develop@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/ 
>> marketplace
>> _______________________________________________
>> Bibdesk-develop mailing list
>> Bibdesk-develop@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
>>
>>
>
> ---------------------------------------------------------------------- 
> ---
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/ 
> marketplace
> _______________________________________________
> Bibdesk-develop mailing list
> Bibdesk-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bibdesk-develop


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to