Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4
-
None
-
None
-
Operating System: Windows 2000
Platform: PC
-
36249
Description
The MVSFTPEntryParser is not setting the raw listing in the FTPFile that it
creates. The toString on FTPFile returns this value which causes a NPE when
trying to list files via ant.
Also it is creating an FTPFile for the header ("Volume Unit...") that it
receives from the host. This also causes a problem with the list function in ant
because it receives 2 entries when requesting a listing for 1 file. Ant
(probably wrongfully) is just taking the first entry in the array that it
receives back so you never get your file names.
The following code is how I got it to work...
private static final String HEADER = "Volume Unit Referred Ext Used Recfm
Lrecl BlkSz Dsorg Dsname";
...
public FTPFile parseFTPEntry(String entry)
{
FTPFile f = null;
if (matches(entry) && !entry.trim().equals(HEADER))
return null;
}