FubarDevelopment / FtpServer

Portable FTP server written in .NET
http://fubardevelopment.github.io/FtpServer/
MIT License
482 stars 163 forks source link

Fix invalid datetime format if LastWriteTime is NULL or last year #15

Closed omelhus closed 7 years ago

omelhus commented 7 years ago

If LastWriteTime was NULL or something other than the current year it would result in ListFormatter to render the date as empty or the given date this year.

I've fixed this by setting the date to 1970-01-01 if it's NULL, and added a check on whether the year is current or not.