ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r394979 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Delete.java
Date Tue, 18 Apr 2006 16:18:08 GMT
Author: mbenson
Date: Tue Apr 18 09:18:05 2006
New Revision: 394979

URL: http://svn.apache.org/viewcvs?rev=394979&view=rev
Log:
Use task project when filesets don't have a project, for backwards compatibility.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Delete.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Delete.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Delete.java?rev=394979&r1=394978&r2=394979&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Delete.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Delete.java Tue Apr 18 09:18:05
2006
@@ -547,6 +547,12 @@
 
         for (int i = 0; i < filesets.size(); i++) {
             FileSet fs = (FileSet) filesets.get(i);
+            if (fs.getProject() == null) {
+                log("Deleting fileset with no project specified;"
+                    + " assuming executing project", Project.MSG_VERBOSE);
+                fs = (FileSet) fs.clone();
+                fs.setProject(getProject());
+            }
             resourcesToDelete.add(fs);
             if (includeEmpty && fs.getDir().isDirectory()) {
               filesetDirs.add(new ReverseDirs(fs.getDir(),



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


Mime
View raw message