ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Chmod.java
Date Wed, 10 Apr 2002 14:42:42 GMT
bodewig     02/04/10 07:42:42

  Modified:    src/main/org/apache/tools/ant/taskdefs Chmod.java
  Log:
  reset internal state in <chmod> (bug 7552 audit).
  
  Revision  Changes    Path
  1.22      +9 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java
  
  Index: Chmod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Chmod.java	3 Mar 2002 01:46:20 -0000	1.21
  +++ Chmod.java	10 Apr 2002 14:42:42 -0000	1.22
  @@ -172,13 +172,19 @@
   
       public void execute() throws BuildException {
           if (defaultSetDefined || defaultSet.getDir(project) == null) {
  -            super.execute();
  +            try {
  +                super.execute();
  +            } finally {
  +                filesets.removeElement(defaultSet);
  +            }
           } else if (isValidOs()) {
               // we are chmodding the given directory
  -            createArg().setValue(defaultSet.getDir(project).getPath());
               Execute execute = prepareExec();
  +            Commandline cloned = (Commandline) cmdl.clone();
  +            cloned.createArgument().setValue(defaultSet.getDir(project)
  +                                             .getPath());
               try {
  -                execute.setCommandline(cmdl.getCommandline());
  +                execute.setCommandline(cloned.getCommandline());
                   runExecute(execute);
               } catch (IOException e) {
                   throw new BuildException("Execute failed: " + e, e, location);
  
  
  

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


Mime
View raw message