You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2004/12/01 15:41:21 UTC

Re: svn commit: r12099 - branches/locking/subversion/mod_dav_svn

On Nov 30, 2004, at 4:16 PM, Philip Martin wrote:

> sussman@tigris.org writes:
>
>> --- branches/locking/subversion/mod_dav_svn/repos.c	(original)
>> +++ branches/locking/subversion/mod_dav_svn/repos.c	Tue Nov 30 
>> 15:56:39 2004
>> @@ -1376,9 +1376,31 @@
>>                         "software.");
>>  }
>>
>
> This function has no documentation.

Will fix.

>
>> +
>> +static const char *get_parent_path(const char *path,
>> +                                   apr_pool_t *pool)
>> +{
>> +  apr_size_t len;
>> +  const char *parentpath, *basename;
>> +  char *tmp = apr_pstrdup(pool, path);
>> +
>> +  /* Remove any trailing slash; they make svn_path_split() assert 
>> and die.*/
>
> Why are non-canonical paths being passed around?

Good question.  It seems to be part of the mystery of mod_dav_svn's 
complicated internal structures.  Though it's not fs-paths or wc-paths 
that have trailing slashes --  it seems to be only fields that hold 
URIs (or chunks of URIs), things like

       /repos/!svn/bln/39/blah/


>
>> +  len = strlen(tmp);
>> +  if (tmp[len-1] == '/')
>
> Since I don't know if "" is a valid input I don't know whether [len-1]
> is safe.
>
>

Thanks, will fix.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org