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

Re: [RFC] Canonical Paths

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-08-29 19:38:28 CEST

cmpilato@collab.net writes:

> Also, I'm wondering something. If '' is the canonical empty dir, then
> would:
> svn_path_canonicalize ('./foo')
> return 'foo' (which feels, for unexplained reasons, like an
> information loss) or '/foo' (which is plain wrong) ?

On a system where '.' denotes the current working directory, then
svn_path_canonicalize ('./foo') should definitely return 'foo'. These
names denote the same object per definition, so there is no information
loss. And since they are by definition the same they _should_
canonicalize to the same name; this name being the "canonical" name
for the object. Hence "canonicalization".

On a system where '.' does _not_ mean the current working directory
(but where '/' is still the directory separator), you should get back
'./foo' because foo would then reside in the distinct directory '.'
which is different from the cwd.

  // Marcus

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 29 19:39:31 2002

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.