Index: FileUtils.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/util/FileUtils.java,v
retrieving revision 1.14
diff -u -r1.14 FileUtils.java
--- FileUtils.java	25 Feb 2002 11:03:40 -0000	1.14
+++ FileUtils.java	26 Feb 2002 21:26:54 -0000
@@ -377,12 +377,13 @@
             .replace('\\', File.separatorChar);
 
         // deal with absolute files
-        if (filename.startsWith(File.separator) ||
-
-            (filename.length() >= 2 &&
-             Character.isLetter(filename.charAt(0)) &&
-             filename.charAt(1) == ':')
 
+        // the assumption that the : will appear as the second character in
+        // the path name breaks down when NetWare is a supported platform.
+        // Netware volumes are of the pattern: "data:\"
+        int colon = filename.indexOf(":");
+        if (filename.startsWith(File.separator) ||
+            (colon > -1)
             ) {
             return normalize(filename);
         }
@@ -435,45 +436,42 @@
             .replace('\\', File.separatorChar);
 
         // make sure we are dealing with an absolute path
+        int colon = path.indexOf(":");
         if (!path.startsWith(File.separator) &&
-            ! (path.length() >= 2 &&
-               Character.isLetter(path.charAt(0)) &&
-               path.charAt(1) == ':')
-            ) {             
+            (colon == -1)
+            ) {
             String msg = path + " is not an absolute path";
             throw new BuildException(msg);
         }
             
         boolean dosWithDrive = false;
         String root = null;
-        // Eliminate consecutive slashes after the drive spec
-        if (path.length() >= 2 &&
-            Character.isLetter(path.charAt(0)) &&
-            path.charAt(1) == ':') {
 
+        if (colon > -1) {
             dosWithDrive = true;
 
             char[] ca = path.replace('/', '\\').toCharArray();
-            StringBuffer sb = new StringBuffer();
-            sb.append(Character.toUpperCase(ca[0])).append(':');
+            StringBuffer sbRoot = new StringBuffer();
+            for (int i = 0; i < colon; i++) {
+                sbRoot.append(Character.toUpperCase(ca[i]));
+            }
+            sbRoot.append(':');
+            if (colon + 1 < path.length()) {
+                sbRoot.append(File.separatorChar);
+            }
+            root = sbRoot.toString();
 
-            for (int i = 2; i < ca.length; i++) {
+            // Eliminate consecutive slashes after the drive spec
+            StringBuffer sbPath = new StringBuffer();
+            for (int i = colon+1; i < ca.length; i++) {
                 if ((ca[i] != '\\') ||
                     (ca[i] == '\\' && ca[i - 1] != '\\')
                     ) {
-                    sb.append(ca[i]);
+                    sbPath.append(ca[i]);
                 }
             }
+            path = sbPath.toString().replace('\\', File.separatorChar);
 
-            path = sb.toString().replace('\\', File.separatorChar);
-            if (path.length() == 2) {
-                root = path;
-                path = "";
-            } else {
-                root = path.substring(0, 3);
-                path = path.substring(3);
-            }
-            
         } else {
             if (path.length() == 1) {
                 root = File.separator;

