In ProcessGetEntry there is a status code check which doesn't seem to align with my FTP server...
private static FtpEntry ProcessGetEntry(FtpSession session, FtpPath path) { session.CheckProtection(FtpProtection.ControlChannel); var reply = session.SendCommand("STAT", session.Connection.Client.GetPlatform(session).EscapePath(path.ToString())); if (reply.Code != 213 || reply.Lines.Length <= 2) return null; // now get the type: the first entry is "." for folders or file itself for files/links var entry = EnumerateEntries(session.Connection.Client, path, reply.Lines.Skip(1), ignoreSpecialEntries: false).First(); // actually, it's always good here return new FtpEntry(path, entry.Size, entry.Type, entry.Date, entry.Target); }
My FTP server seems to return status code 211 instead of 213 as the code expects. Everything else in the response is fine, I get full details of the remote file I queried.
In ProcessGetEntry there is a status code check which doesn't seem to align with my FTP server...
private static FtpEntry ProcessGetEntry(FtpSession session, FtpPath path) { session.CheckProtection(FtpProtection.ControlChannel); var reply = session.SendCommand("STAT", session.Connection.Client.GetPlatform(session).EscapePath(path.ToString())); if (reply.Code != 213 || reply.Lines.Length <= 2) return null; // now get the type: the first entry is "." for folders or file itself for files/links var entry = EnumerateEntries(session.Connection.Client, path, reply.Lines.Skip(1), ignoreSpecialEntries: false).First(); // actually, it's always good here return new FtpEntry(path, entry.Size, entry.Type, entry.Date, entry.Target); }
My FTP server seems to return status code 211 instead of 213 as the code expects. Everything else in the response is fine, I get full details of the remote file I queried.