You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ich Selbst <ic...@gmx.ch> on 2002/11/19 19:24:56 UTC

svn_path_internal_style() is broken

could someone please fix that?
right now it converts e.g. "C:\test\project" to "" (empty string).
and svn_path_local_style() suffers the same symptomps.

Steve

that way it works:

const char *
svn_path_internal_style (const char *path, apr_pool_t *pool)
{
if ('/' != SVN_PATH_LOCAL_SEPARATOR)
{
char *p;
char *q;
/* Convert all local-style separators to the canonical ones. */
q = apr_pstrdup(pool, path);
for (p = q; *p != '\0'; ++p)
{
if (*p == SVN_PATH_LOCAL_SEPARATOR)
*p = '/';
}
return svn_path_canonicalize (q, pool);
}
return svn_path_canonicalize (path, pool);
/* FIXME: Should also remove trailing /.'s, if the style says so. */
}

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

Re: svn_path_internal_style() is broken

Posted by br...@xbc.nu.
Quoting Greg Hudson <gh...@MIT.EDU>:

> On Tue, 2002-11-19 at 14:50, brane@xbc.nu wrote:
> > What the -- yuck. That was really horrible. It should be fixed in
> r3830
> 
> Whoops, sorry about that.  It's a surprisingly tricky function to get
> right.  (And clearly we need something in the test suite for it.)

Testing it wouldn't have helped, because the relevant part only gets used on
Windows (as we haven't any other platforms where / isn't the directory
separator). And that's bad, of course. I'll try to do something about that in
the context of issue 872.

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

Re: svn_path_internal_style() is broken

Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2002-11-19 at 14:50, brane@xbc.nu wrote:
> What the -- yuck. That was really horrible. It should be fixed in r3830

Whoops, sorry about that.  It's a surprisingly tricky function to get
right.  (And clearly we need something in the test suite for it.)


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

Re: svn_path_internal_style() is broken

Posted by br...@xbc.nu.
Quoting Ich Selbst <ic...@gmx.ch>:

> could someone please fix that?
> right now it converts e.g. "C:\test\project" to "" (empty string).
> and svn_path_local_style() suffers the same symptomps.

What the -- yuck. That was really horrible. It should be fixed in r3830

    Brane

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