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

[PATCH] Fix problem commiting to "/" Location

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-09-18 18:49:26 CEST

Philip Martin <philip@codematters.co.uk> writes:

> Philip Martin <philip@codematters.co.uk> writes:
>
> > I get the same error over http when I try to commit to a "/" Location.
> > Looks like we may have a bug, I seem to remember that "/" didn't work
> > at all in the past, and that some recent changes made (some of) it
> > work.

This "works for me", but I don't pretend to understand all this
DAV/URL stuff.

* subversion/mod_dav_svn/util.c (dav_svn_simple_parse_uri): Handle
  root that is "/"

Index: subversion/mod_dav_svn/util.c
===================================================================
--- subversion/mod_dav_svn/util.c
+++ subversion/mod_dav_svn/util.c Wed Sep 18 17:39:44 2002
@@ -184,6 +184,8 @@
    */
   len1 = strlen(path);
   len2 = strlen(relative->info->repos->root_path);
+ if (len2 == 1 && relative->info->repos->root_path[0] == '/')
+ len2 = 0;
   if (len1 < len2
       || (len1 > len2 && path[len2] != '/')
       || memcmp(path, relative->info->repos->root_path, len2) != 0)

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 18 18:50:03 2002

This is an archived mail posted to the Subversion Dev mailing list.