apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] apr_dir_remove_recursively
Date Wed, 23 May 2001 16:23:54 GMT
From: "Ben Collins-Sussman" <sussman@collab.net>
Sent: Wednesday, May 23, 2001 10:31 AM


> "William A. Rowe, Jr." <admin@rowe-clan.net> writes:
> 
> > > I agree.  I'm thinking of rewriting it to leave files behind.  I
> > > suspect the routine could return either APR_SUCCESS (if nothing but
> > > was left behind), or some not-yet-invented error code that
> > > specifically means it wasn't able to remove everything.
> > 
> > should simply return the error that the _remove returned, so if there is
> > an error, there was some reason it wasn't completed.  But it still completes
> > all that it is allowed.
> 
> What if 3 different files in the tree (scattered about) are
> un-removable for different reasons?  This function still removes
> everything else and finishes its recursion.  Which of the three status
> codes should it return?

The first it encountered.

Here's the scenario...

path/to/some/where/file

If we remove 'some', and fail at file due to EACCESS, we will fail at 'where' 
as well since it contains files, and at 'some' since it contains a directory.
We don't care that we failed because files remain, we care why that file 
remains in the first place.

Bill



Mime
View raw message