|Subject:||Re: FTPListOutput silently fails when FileName contains full or relative path|
|Posted by:||TJ Nannon (in…@cheddar.mailworks.org)|
|Date:||Wed, 12 Jan 2005|
I have worked around this by implementing the FTPServer's OnCustomListDirectory event; I now generate the directory listing myself.
Remy / whoever - can you file this as a bug against the FTPListOutput class?
On Mon, 10 Jan 2005 20:11:50 -0500, TJ Nannon <in…@cheddar.mailworks.org> wrote:
> When the client issues the commands:
> cd /
> nlist /Foo
> the server should respond with the following file list on the data channel:
> The best I can get the Indy FTPListOutput class to do is to respond with just "File_A.txt", which is not correct, at least compared to the BSD ftp server.
> When the FileName property of the FTPListOutputItem contains a full path (or a slash or backslash in it anywhere), the resulting output is an empty string: "", no newline or anything.
> The following code (C#) demonstrates the problem with Indy 10.0.51.
> I expect the output "/Foo/File_A.txt\r\
", but I get "".
> FTPListOutput ftpListOutput = new FTPListOutput();
> ftpListOutput.DirFormat = DirOutputFormat.doUnix;
> FTPListOutputItem ftpItem = ftpListOutput.Add();
> ftpItem.ItemType = DirItemType.ditFile;
> ftpItem.FileName = "/Foo/File_A.txt";
> IndyStrings dirContentsStringList = new IndyStringList();
> ftpListOutput.NLISTOutputDir( dirContentsStringList );
> string result = dirContentsStringList.Text;
FTPListOutput silently fails when FileName contains full or relative path posted by TJ Nannon on Mon, 10 Jan 2005