[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Better workaround for systems with broken readdir

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-07-06 21:28:52 CEST

On 7/5/06, Artem Egorkine <arteme@gmail.com> wrote:
> Hi,
>
> I can now confirm that readdir() of FreeBSD-6.1RC is broken just like
> that of MacOS X, see
> http://subversion.tigris.org/issues/show_bug.cgi?id=1896 for more
> discussion.
>
> Forcefuly applying the MacOS workaround as described in that issue
> fixes the problem on FreeBSD. The problem with the workaround is that
> a call to rewinddir() after deleting every file makes
> svn_io_remove_dir() quite slow.
>
> As I proposed in http://svn.haxx.se/dev/archive-2006-06/0694.shtml
> thread, here is in my oppinion a better solution:
>
> 1. readdir()
> 2. if there's nothing to delete, we're done
> 3. delete everything
> 4. rewinddir()
> 5. goto 1
>
> Please find a patch attached that does exactly that. It is
> unconditional of MacOS or FreeBSD. The overhead on an OS without the
> bug is one rewinddir() and two readdir()s, which is not much. The
> benefit, however, is that we'll never have to face the problem ever
> again even when we encounter other systems that a similar problem is
> found on.

This seems fine to me, committed in r20459, with a few formatting tweaks.

Thanks!

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 6 21:29:57 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.