tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@hyperreal.org
Subject cvs commit: jakarta-tools/ant/src/main/org/apache/tools/ant Project.java
Date Fri, 03 Dec 1999 12:41:43 GMT
pier        99/12/03 04:41:43

  Modified:    ant/src/main/org/apache/tools/ant Project.java
  Log:
  I found a small bug: on Windows NT i get this error message:
  IOException getting canonical path for C:\CVSArchive\jakarta-tools\ant\C:\WinNT\Profiles\Pier\opt\ant\lib\ant.jar:
The filename, directory name, or volume label syntax is incorrect
  
  Yous see that "C:\CVSArchive\jakarta-tools\ant\" is appears two times?
  Well, it's not a typo. This fixes it.
  
  Revision  Changes    Path
  1.15      +3 -1      jakarta-tools/ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Project.java	1999/11/30 21:45:20	1.14
  +++ Project.java	1999/12/03 12:41:42	1.15
  @@ -310,7 +310,9 @@
   
       public File resolveFile(String fileName) {
   	// deal with absolute files
  -	if(fileName.startsWith("/") ) return new File( fileName );
  +	if (fileName.startsWith("/")) return new File( fileName );
  +	if (System.getProperty("os.name").toLowerCase().startsWith("windows"))
  +	    if (fileName.indexOf(":\\")==1) return new File( fileName );
   
   	File file = new File(baseDir.getAbsolutePath());
   	StringTokenizer tok = new StringTokenizer(fileName, "/", false);
  
  
  

Mime
View raw message