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

Re: svn commit: r21621 - in trunk/subversion: libsvn_subr tests/cmdline tests/cmdline/svntest tests/libsvn_subr

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2006-10-03 10:00:27 CEST

Quoting David James <djames@collab.net>:

> On 9/23/06, lgo@tigris.org <lgo@tigris.org> wrote:
> > --- trunk/subversion/libsvn_subr/path.c (original)
> > +++ trunk/subversion/libsvn_subr/path.c Sat Sep 23 08:44:04 2006
> > @@ -191,7 +191,7 @@
> > the total length. */
> > total_len = len;
> > base_arg = nargs;
> > - base_is_root = len == 1;
> > + base_is_root = svn_path_is_root(s, len, pool);
> > base_is_empty = FALSE;
> > }
> > else if (nargs == base_arg
> > @@ -254,7 +254,8 @@
> > (which can happen when base_arg is set). also, don't put in a
> slash
> > if the prior character is a slash (occurs when prior component
> > is "/"). */
> > - if (p != path && p[-1] != '/')
> > + if (p != path && p[-1] != '/' &&
> > + ! (nargs - 1 == base_arg && base_is_root))
> > *p++ = '/';
> >
> > /* copy the new component and advance the pointer */
>
> If the first arg is an UNC path, we'll want to append a slash here.
> E.g., if the first component is //server/share, and the second
> component is file.txt, we'll want a slash in between the two
> components.
>
> I think we should simply check for whether the first path ends with a
> ':' or a '/', instead of calling svn_path_is_root, because it's a more
> reliable test.

Problem with that test for ':' is that we only have to do that on Windows, which
means we will put a lot of #ifdef's in the code. Isn't it better to improve the
performance of the svn_path_is_root function instead?

Lieven.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 3 10:00:49 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.