0 votes
by (150 points)

Hi, i have an FTP Server with a Linux Style Raw List. Normaly there is now Problem, but on this Server, if i make the GetList all Files have NOW as modified DateTime.

What is wrong there, does the Parser have Problem?

Example Line from RawList -rw-rw-rw- 1 user group 1929 Jun 1 18:02 xyz.zip

Applies to: Rebex FTP/SSL

2 Answers

0 votes
by (132k points)
Best answer

It turned out this was caused by a bug in MLST listing parser. We will fix this in the next release due to be out in a week or two.

In the meantime, you can disable MLST listings by disabling the corresponding extension prior to calling the GetList mehod:


ftp.EnabledExtensions &= ~FtpExtensions.MachineProcessingList;


ftp.EnabledExtensions = ftp.EnabledExtensions And Not FtpExtensions.MachineProcessingList

(where "ftp" is an instance of Ftp object)

This will make the GetList method use LIST instead of MLST.


This workaround is no longer needed. The fix in included in build 3854 released in summer 2010.

0 votes
by (132k points)

The list parser returns DateTime.Now if there was a problem parsing the date, but that doesn't seem to be the case here. The following code parses the modified date fine using the same parser used by the GetList method:

FtpItem item = FtpItem.Parse("-rw-rw-rw- 1 user group 1929 Jun 1 18:02 xyz.zip");

There might be some additional non-printable characters in the raw listing that cause the problem you describe.

In order to determine what is going on, please try calling GetRawList instead of GetList method and send us the result - encode the lines as Base64 to preserve the original content:

System.Text.StringBuilder listing = new System.Text.StringBuilder();
string[] lines = ftp.GetRawList();
foreach (string line in lines)
    string encodedLine = Convert.ToBase64String(System.Text.Encoding.Default.GetBytes(line));

string result = listing.ToString();

Mail us the content of result to support@rebex.net or edit your question to include the listing.

If you prefer VB.NET, please let me know.

by (150 points)
If I parse it by my own than its working correctly. The parser ist working and I get the right modified time. And I also have send you an email with the Base64 encoding of this directory.