ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: FileUtils#normalize(File)
Date Tue, 29 Jul 2003 14:13:58 GMT
On Mon, 28 Jul 2003, Knut Wannheden <> wrote:

> I've noticed that the normalize(File) method in FileUtils requires
> that the File to normalize is absolute.  I was wondering what the
> reason is for this reason.

I'm not entirely sure (we extracted the code from Project way back
IIRC).  On problem I can imagine is that of relative paths that go up
beyond "", something like normalize("../../foo").

> Even a path like "../foo" could be normalized using the system
> property "user.dir",

No, most invocations of normalize happen from resolveFile, so you
already know which absolute directory to resolve against.  ${user.dir}
is almost always wrong for Ant's own usage.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message