This project is read-only.

Strange Date format from server makes EnumFiles useless

Feb 18, 2014 at 10:13 AM
I'm trying your library for a small Windows CE device.

It's working well and I thank you a lot for sharing it ! I'm facing a strange behavior when I'm using the method EnumFiles. Basically, it's not working, i get 0 files whenever I run it.

I debugged a bit and realized that when getting the files within a directory, when the method GetFiles returns, the string returned for each files contains a datetime that is badly formatted.

Exemple :
"02-17-14 17:26: 7796 MyFile.jpg"

The following call generates an exception :
// FTP.CS - public FTPFiles EnumFiles()
filedate = Convert.ToDateTime(lines[l].Substring(0,17));

Where is the problem ? Is my FTP server returning funny time stamps ? Do I have to change the way you're creating a DateTime ? It seems strange to me that this problem never occured to anyone before me...

What is your opinion/advice on this ? Thanks in advance for your precious help !