nico        01/08/26 14:22:30

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/net Tag:
                        ANT_14_BRANCH FTP.java
  Log:
  Finally fixed a IndexOutOfBoundsException that can occur if accessing a
  Microsoft FTP-Server (IIS FTP-Service) running in MS-DOS mode for directory
  listings.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.1   +3 -1      
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.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- FTP.java  2001/07/27 14:50:43     1.7
  +++ FTP.java  2001/08/26 21:22:30     1.7.2.1
  @@ -586,7 +586,9 @@
   
           FTPFile[] files = ftp.listFiles(remoteFile);
   
  -        if (files == null)
  +        // For Microsoft's Ftp-Service an Array with length 0 is 
  +        // returned if configured to return listings in "MS-DOS"-Format
  +        if (files == null || files.length == 0)
           {
               // If we are sending files, then assume out of date.
               // If we are getting files, then throw an error
  
  
  

Reply via email to