> 
> If it's a symlink you should be able to readlink it (see 
> perlfunc) to get
> the thing that it points at
> (although you'll have to do some file concatenation logic 
> based on whether
> it's absolute or relative)
> And then you can test that (and work your way along the symlink chain,
> but make sure you put a trap in after a some large number of 
> steps else
> you will be gotcha'd by symlinks looping back to themselves)
> 
> 

You could catch that by recording which inode's you'd already visited
in the chain. If it's one you've already seen, then it's a loop.

Mike.

Reply via email to