ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27922] - Launcher fails for UNC drive names as ANT_HOME
Date Sat, 27 Mar 2004 23:18:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27922>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27922

Launcher fails for UNC drive names as ANT_HOME





------- Additional Comments From rainer@noacks.net  2004-03-27 23:18 -------
After some investigation, I found out that this depends on the inconsistency
of how Java notates UNC pathes as URLs and URIs:
1. new File()"\\\\A\\B").toURI().toString() = "file:////A/B"     whereas
2. new File()"\\\\A\\B").toURL().toString() = 
   new File()"\\\\A\\B").toURI().toURL().toString() = "file://A/B"

Locator's fromURI-method would handle the 1st case (as implied by the 
method name) correctly but overgiven arguments are constructed in
the 2nd way. 

The inconsistency is a generally Java Problem. 
However, Ant should support UNC path names as they are widely used.

It might be a possible solution, to change the behaviour in Loactor's fromURI
method to strip only two leading slashes if there are more then two. But I'm
not familiar with file-URLs produced from the various OSs that Ant supports.

Regards,
Rainer

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


Mime
View raw message