[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: Philip Martin <philip_at_codematters.co.uk>
Date: Sat, 22 Nov 2008 23:12:11 +0000

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 @@

   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?

---------------------------------------------------------------------
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 00:12:26 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.