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

parsing paths

From: Jim Blandy <jimb_at_zwingli.cygnus.com>
Date: 2001-02-15 19:51:17 CET

I've just committed some path-traversal code to libsvn_fs/tree.c which
includes a function next_entry_name for parsing paths.

I know there are existing functions for dealing with paths in
libsvn_subr, but they don't work the way I want. In particular:

- They leave it to the caller to interpret series of two or more
  consecutive slashes. The filesystem interface defines how they must
  be interpreted (see svn_fs.h, "Directory entry names and directory
  paths"), requiring that they be handled as in POSIX: multiple
  slashes are equivalent to one slash.

- They don't provide any convenient way to handle trailing slashes.
  The filesystem also defines what this means, consistent with the
  usage in the GNU fileutils (and, I think, POSIX). next_entry_name
  does something that is easy to deal with.

I'm not saying the libsvn_subr function should be changed to behave
this way. But I know people will tell me I'm duplicating code, so I'm
just explaining the behavior I require. If libsvn_subr wants to
provide it, groovy for me. I don't feel that I know its clientele
well enough to make changes there myself.
Received on Sat Oct 21 14:36:22 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.