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

Re: path-test failing

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 23 Nov 2008 12:06:14 +0000

On Sat, Nov 22, 2008 at 11:12:11PM +0000, Philip Martin wrote:
> While looking at path.c I came across this very old patch sitting in
> my working copy:
>
> Index: ../src/subversion/libsvn_subr/path.c
> ===================================================================
> --- ../src/subversion/libsvn_subr/path.c (revision 34342)
> +++ ../src/subversion/libsvn_subr/path.c (working copy)
> @@ -547,19 +547,8 @@

Bit of missing context for human readers:

  path = apr_palloc(pool, max_length + 1);
  p = path;

>
> for (i = 0; i < components->nelts; ++i)
> {
> - /* Append a '/' to the path. Handle the case with an absolute
> - path where a '/' appears in the first component. Only append
> - a '/' if the component is the second component that does not
> - follow a "/" first component; or it is the third or later
> - component. */
> - if (i > 1 ||
> - (i == 1 && strcmp("/", APR_ARRAY_IDX(components,
> - 0,
> - const char *)) != 0))
> - {
> - *p++ = '/';
> - }
> -
> + if (p > path && p[-1] != '/')
> + *p++ = '/';
> memcpy(p, APR_ARRAY_IDX(components, i, const char *), lengths[i]);
> p += lengths[i];
> }
>
> Do people think this is a sensible simplification?
>

Yes, but why remove the comment?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-23 13:06:36 CET

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.