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

Re: path canonicalization problem (issue #559)

From: <cmpilato_at_collab.net>
Date: 2002-01-20 16:55:23 CET

Garrett Rooney <rooneg@electricjellyfish.net> writes:

> i did a little poking around with this a few days ago, and it's not
> promising...
> now that we've removed the path types, we're back to the problem that
> we pass quite a few url's into svn_path_canonicalize, and we don't
> have any way to determine how to handle them. removing extraneous .'s
> and ..'s isn't too hard, but removing redundant /'s is a bitch,
> because we have to be sure not to wipe out the // in the urls.
> if anyone has a good solution for this, i'd love to hear it. i don't
> want to return to passing path types into all the svn_path functions,
> and having some kind of heuristic to determine what to remove and what
> to leave just seems clunky and prone to failure.

I don't know if it's a *good* solution, but svn_path_canonicalize
could start calling svn_path_is_url() (which itself can use some
maturing) to test for URL-ness. Once URL-ness is discovered, the
simple rule could be that we will never remove any of the first three
'/'s in the path:

   | |
   +------- "safe zone" -------+

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:57 2006

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