apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <ad...@rowe-clan.net>
Subject Re: [PATCH] apr_dir_remove_recursively
Date Wed, 23 May 2001 13:14:20 GMT
From: "Ben Collins-Sussman" <sussman@collab.net>
Sent: Tuesday, May 22, 2001 8:44 AM

> OK, it's not actually a patch, because I'm not sure where it ought to
> live.  I've attached it below.
> The function apr_dir_remove() won't work on a non-empty directory, so
> this routine fills the gap.  It's equivalent to 'rm -rf'.

My personal preference is that the remove continues to run, leaving only
droppings it can't remove.  Nothing irks me more than fixing the 'one file'
that couldn't be removed, only to trip over the next one on the next pass.
And save the first failure result for return to the caller.

Does it make sense to apply some lstat check against the tree, such that
symlinks' targets aren't blown away?  I'm not clear if your patch protects 
that or not.


View raw message