Branko Čibej wrote:
> rooneg@tigris.org wrote:
>
>> Actually, since APR lacks a 'recursively delete directory' function,
>> I'm not
>> sure if this can be solved there. Working around the problem involves
>> rewinding
>> a directory every time we delete something in it. apr_file_remove and
>> apr_dir_remove can't do that, because it has no knowledge of the
>> enclosing
>> directory. It's likely that we'll have to fix the bug in Subversion,
>> rather
>> than APR.
>>
>>
> Another workaround is to do the complete readdir into memory first, then
> iterate over that list. It uses more memory during a recursive delete,
> but avoids having to rewinddir all the time. I'd really rather waste the
> memory than issue an extra system call for every directory entry.
I'm not especially thrilled with the idea of reading an arbitrary amount
of data into memory... If someone else wants to implement this, they
can feel free, but IMO the rewinddir solution (which can be ifdef'd to
only occur on systems where the problem exists) is cleaner.
> It would be nice if the recursive-delete function went into APR, though.
I'm not saying that it shouldn't, but even if it does, we're going to
need to support older APRs for a while, so we need a fix in svn.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 27 18:37:34 2004