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