avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 21205 - avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks
Date Mon, 14 Jun 2004 13:41:44 GMT
Author: mcconnell
Date: Mon Jun 14 06:41:43 2004
New Revision: 21205

Modified:
   avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/FilterTask.java
Log:
fix native path generation for windows

Modified: avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/FilterTask.java
==============================================================================
--- avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/FilterTask.java	(original)
+++ avalon/trunk/tools/project/src/main/org/apache/avalon/tools/tasks/FilterTask.java	Mon
Jun 14 06:41:43 2004
@@ -150,22 +150,38 @@
         {
             if( i>0 )
             {
-                buffer.append( File.pathSeparator );
+                buffer.append( ";" );
             }
 
             ResourceRef ref = refs[i];
             Resource resource = getHome().getResource( ref );
-            buffer.append( symbol );
-            if( windows )
-            {
-                buffer.append( "\\" );
-                buffer.append( resource.getInfo().getPath().replace( '/', '\\' ) );
-            }
-            else
-            {
-                buffer.append( "/" );
-                String path = resource.getInfo().getPath();
-            }
+            String path = getNativePath( windows, resource );
+            buffer.append( path );
+        }
+
+        if( refs.length > 0 )
+        {
+            buffer.append( ";" );
+        }
+
+        buffer.append( getNativePath( windows, def ) ); 
+        return buffer.toString();
+    }
+
+    private String getNativePath( boolean windows, Resource resource )
+    {
+        String symbol = getPlatformCacheSymbol( windows );
+        StringBuffer buffer = new StringBuffer( symbol );
+        String path = resource.getInfo().getPath();
+        if( windows )
+        {
+            buffer.append( "\\" );
+            buffer.append( path.replace( '/', '\\' ) );
+        }
+        else
+        {
+            buffer.append( "/" );
+            buffer.append( path );
         }
         return buffer.toString();
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message