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

Re: svn commit: r39529 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 22 Sep 2009 17:40:20 -0400

On Tue, Sep 22, 2009 at 17:12, Stefan Sperling <stsp_at_elego.de> wrote:
>...
> +++ trunk/subversion/libsvn_wc/adm_ops.c        Tue Sep 22 14:12:33 2009        (r39529)
> @@ -1086,11 +1086,16 @@ erase_from_wc(svn_wc__db_t *db,
>
>       /* Now handle any remaining unversioned items */
>       err = svn_io_get_dirents2(&unversioned, local_abspath, scratch_pool);
> -
> -      if (err && APR_STATUS_IS_ENOTDIR(err->apr_err))
> +      if (err)
>         {
> -          svn_error_clear(err);
> -          return SVN_NO_ERROR;
> +          if (APR_STATUS_IS_ENOTDIR(err->apr_err) ||
> +              APR_STATUS_IS_ENOENT(err->apr_err))
> +            {
> +              svn_error_clear(err);
> +              return SVN_NO_ERROR;
> +            }
> +          else
> +            SVN_ERR(err);
>         }

No need for the "else" since the true-block returns. Also the
SVN_ERR() test isn't needed -- you *know* there is an error.

return svn_error_return(err);

simple...

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2398654
Received on 2009-09-22 23:40:29 CEST

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.