ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: File.toURL() and
Date Wed, 22 Aug 2012 18:41:50 GMT
On 08/22/2012 02:30 PM, Nicolas Lalevée wrote:
> I could not think we can put 4 slashes

file:////server/share/path is the broken result of new File("\\\\server\\share\\path").toURI().
While new File(URI) works to round-trip it (IIRC), if you call 
URI.normalize() or otherwise do any kind of interesting manipulation at the URI level, you
wind up with C:\server\share\path which is dead wrong. Path.toUri fixes this 
problem using the host field. The test is just checking that URI -> File conversion is
forgiving enough to accept the undesirable URI format if you happened to use 
File.toURI initially.

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

View raw message