ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: FileUtils.normalize
Date Sun, 20 Feb 2005 14:09:24 GMT

--- Martijn Kruithof <jm@kruithof.xs4all.nl> wrote:

> Matt Benson wrote:
> 
> >FileUtils.resolveFile claims to return absolute
> files;
> >however calling FileUtils.resolveFile(null, "\\")
> on
> >DOS returns the non-absolute File "\\".  So we lie.
> 
> >:)
> >
> >-Matt
> >  
> >
> 
> No file on windows is allowed to have \ in the name,
> so \\ would not be a
> valid file on dos at all (so not a non-absolute one,
> but none at all).

Well, not in the name, but \ by itself ("\\" in Java)
is a relative filename meaning "root of the current
working drive."  As for \\ aka "\\\\" my opinion is
that is no file at all.  \ falls into the category of,
to be precise, relative files.  It may be easiest for
us to throw errors on this filename on DOS.  Likewise
for X:somefile with no separator after the colon;
currently we return a totally different File, which I
think crosses the line of acceptability.

-Matt


> 
> Martijn
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message