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

Re: patch: don't bail when ALLUSERPROFILE is missing

From: Alan Wood <Alan.Wood_at_clear.net.nz>
Date: Wed, 17 Jun 2009 19:48:06 +1200

Hi Stefan,
 I have just been looking at your patch.

Maybe we could add another hunk to remove the following
comment as you have seen that it is wrong.

svn_error_t *
svn_config__sys_config_path(const char **path_p,
                            const char *fname,
                            apr_pool_t *pool)
{
  /* ### This never actually returns error in practice. Perhaps the
     prototype should change? */

  *path_p = NULL;

Alan Wood

On 16 Jun 2009 at 20:06, Stefan Küng wrote:

> Stefan Sperling wrote:
> > On Tue, Jun 16, 2009 at 07:07:57PM +0200, Stefan Küng wrote:
> >> [[[
> >> Do not bail if the ALLUSERPROFILE folder does not exist.
> >> * subversion/libsvn_subr/config.c
> >> (get_category_config): handle the error gracefully.
> >> ]]]
> >> Index: subversion/libsvn_subr/config.c
> >> ===================================================================
> >> --- subversion/libsvn_subr/config.c (Revision 38046)
> >> +++ subversion/libsvn_subr/config.c (Arbeitskopie)
> >> @@ -198,6 +198,7 @@
> >> {
> >> const char *usr_reg_path = NULL, *sys_reg_path = NULL;
> >> const char *usr_cfg_path, *sys_cfg_path;
> >> + svn_error_t *error = NULL;
> >
> > Minor nitpick: We usually call errors just "err".
> >
> >> *cfg = NULL;
> >>
> >> @@ -210,7 +211,14 @@
> >> category, NULL);
> >> #endif /* WIN32 */
> >>
> >> - SVN_ERR(svn_config__sys_config_path(&sys_cfg_path, category, pool));
> >> + error = svn_config__sys_config_path(&sys_cfg_path, category, pool);
> >> + if ((error)&&(error->apr_err == SVN_ERR_BAD_FILENAME))
> >
> > We also usually put spaces around operators like &&.
> >
> > Looks good to me otherwise, though I can't test this because
> > I don't run Windows.
> >
> > Stefan
>
> Thanks for the review.
> Corrected patch is attached.
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2362545

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2362700
Received on 2009-06-17 09:48:59 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.