[Adium-devl] Alias instead of symlink?

Evan Schoenberg evan.s at dreskin.net
Mon Nov 13 00:20:26 UTC 2006


On Nov 12, 2006, at 6:42 PM, Peter Hosey wrote:

> I created a disk image on my computer, where the startup volume is  
> called “Macintosh HD”, and sent it to David; he reported that he  
> cannot open the Applications alias. This is in line with how an  
> alias works:
>
> 1. First, the HFS ID for the file is tried. If this works, the file  
> is considered to still exist.
> 2. If not, the file no longer exists, but there may be a new file  
> in the same place (at the same HFS path). If so, that file is used,  
> and the alias is updated to the new HFS ID.
>
You're describing an absolute alias, which is made by Finder in OS X  
by default. (In Mac OS 9, relative aliases were made when file  
sharing was off, while absolute aliases were made when file sharing  
was on. Fun!   The tech note linked below points this out and says,  
"Be sure file sharing is turned off before creating any aliases used  
in packages." Yay for [non]obviousness).

> The part where this falls down is that aliases use HFS paths, not  
> POSIX paths.
>
> 	POSIX: /Applications (Good! Works for any startup volume.)
> 	HFS:   Macintosh HD:Applications: (Bad! Only works for people with  
> the default volume name.)
>
> Which is fine for 90% of users as long as the person who builds the  
> dmg has their boot volume set to the default name. Do we really  
> want to tie it to that?
>
This is because changes to the Makefile in trunk were not merged  
after I fixed this issue in adium-1.0.  A relative, not an absolute,  
alias needs to be used to avoid the problem you described.  http:// 
developer.apple.com/technotes/tn/tn1188.html is, according to  
mkalias's manpage, the relevant tech note.

With a relative alias, all works well.  I merged [18207] from  
adium-1.0 to trunk in [18224], fixing the problem.

> What was wrong with the symbolic link?
Can't apply a Finder color label to a symbolic link.

-Evan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20061112/f2f1a8bd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20061112/f2f1a8bd/attachment.sig>


More information about the devel mailing list