[Users] [ET Trac] [Einstein Toolkit] #453: Formaline deletes files if lib and src are symlinks

Roland Haas roland.haas at physics.gatech.edu
Tue Jun 21 12:56:23 CDT 2011


Hello all,

>  Yes, that is the idea. The patch as stop-gap measure, and then trying to
>  understand the real cause of the problem and correcting git-add-thorn.pl.
> 
>  I do not think that Mac OS allows hard links to directories for regular
>  users. With these, one can create directory structures that are not trees,
>  which would break many Unix expectations; in particular, one can create
>  directory structures disconnected from the root directory and hence
>  unreachable. Root can call the "link" syscall (maybe even from the "ln"
>  command, possibly with a special option) to do this, but it's highly
>  discouraged.
If this issue is just that Mac OS allows hard links for directories then 
  simply changing link() to symlink() for directories: 
http://perldoc.perl.org/functions/symlink.html should fix the issue, 
shouldn't it?

Something like:

if(-d $object) {
   symlink(...)
} else {
   link(...)
}

Yours,
Roland

-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://keys.gnupg.net.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20110621/70220bd8/attachment.bin 


More information about the Users mailing list