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

Re: [RFC] Eliminating svn_io_check_path() calls?

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2007-09-12 19:12:32 CEST

"Erik Huelsmann" <ehuels@gmail.com> writes:

> There's one problem: APR isn't really clear on which errors should be
> expected when incorrectly removing a dir with a remove_file() call.
> That's why I'm submitting the patch below for review. What it does is:
> try to remove the file, if there's an error (any error) it proceeds to
> try directory removal. This may lead to strange error reports if the
> node at hand *was* a file, but coludn't be removed for some reason.

You could use an algorithm that tries three times, then the final
error would be "correct":

    try to remove file
    if that fails
      try to remove directory
      if that fails
        check kind
        if file
          try to remove file
        else
          try to remove directory
             
The final try might even succeed!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 12 23:54:18 2007

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.