apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] apr_dir_remove_recursively
Date Wed, 23 May 2001 22:21:00 GMT
On Wed, May 23, 2001 at 09:17:57AM -0500, Ben Collins-Sussman wrote:
> "William A. Rowe, Jr." <admin@rowe-clan.net> writes:
>...
> > Does it make sense to apply some lstat check against the tree, such that

Nope.

> > symlinks' targets aren't blown away?  I'm not clear if your patch protects 
> > that or not.
> 
> Good idea.

remove() on a symlink does *not* toss the target. It only removes the
symlink.

Think about it: remove tosses the directory entry. The symlink handles
interaction with the file. We aren't touching the file, so we don't get hit
by the symlink.

So... don't do an lstat. That is just wasteful and unneeded.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message