Drake Wilson <[EMAIL PROTECTED]> writes:

> The rmtree implementation actually tries to avoid this, but does it
> wrong: it _reads_ the permissions from the symbolic link, then
> _applies_ changed permissions through chmod, which affects the target
> instead.

There's an lchmod function that avoids this behavior, but I'm not sure
that Perl provides an interface to it without a new XS module.  (It's not
portable to all systems, but it is available on Linux.)

Failing switching to lchmod, File::Path should check with -l whether the
file is a link before chmoding it.

-- 
Russ Allbery ([EMAIL PROTECTED])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to