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/optional/net FTP.java
Date Mon, 15 Apr 2002 09:57:34 GMT
bodewig     02/04/15 02:57:34

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
  Log:
  Make <ftp>'s directory scanner behave the same way as the one for
  normal filesets when it comes to pattern matching.  The current
  version did not look at the directory part at all.
  
  PR: 4411
  
  Revision  Changes    Path
  1.19      +11 -9     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FTP.java	15 Apr 2002 09:33:33 -0000	1.18
  +++ FTP.java	15 Apr 2002 09:57:34 -0000	1.19
  @@ -206,29 +206,31 @@
                       if (!file.getName().equals(".") 
                           && !file.getName().equals("..")) {
                           if (file.isDirectory()) {
  -                            String name = file.getName();
  +                            String name = vpath + file.getName();
                               if (isIncluded(name)) {
                                   if (!isExcluded(name)) {
                                       dirsIncluded.addElement(name);
                                       if (fast) {
  -                                        scandir(name, 
  -                                                vpath + name + File.separator,
  -                                                fast);
  +                                        scandir(file.getName(), 
  +                                                name + File.separator, fast);
                                       }
                                   } else {
                                       dirsExcluded.addElement(name);
  +                                    if (fast && couldHoldIncluded(name)) {
  +                                        scandir(file.getName(), 
  +                                                name + File.separator, fast);
  +                                    }
                                   }
                               } else {
                                   dirsNotIncluded.addElement(name);
                                   if (fast && couldHoldIncluded(name)) {
  -                                    scandir(name, 
  -                                            vpath + name + File.separator, 
  -                                            fast);
  +                                    scandir(file.getName(), 
  +                                            name + File.separator, fast);
                                   }
                               }
                               if (!fast) {
  -                                scandir(name, vpath + name + File.separator, 
  -                                        fast);
  +                                scandir(file.getName(), 
  +                                        name + File.separator, fast);
                               }
                           } else {
                               if (file.isFile()) {
  
  
  

--
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