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