Indy 10 FTP 空列表
我收到一些用户的报告,当从某些服务器(MS FTP)使用 idFTP.List() 时,列表被接收为空(无文件),而实际上服务器上有(非隐藏)文件当前目录。这可能是缺少解析器的情况吗?有趣的是,当我使用该程序从我的服务器(W2003 上的 MSFTP)获取列表时,一切似乎都正常,但在某些服务器上我遇到了这个问题。
在D2010上使用最新的Indy10。有什么想法吗?
I have been receiving reports from some of my users that, when using idFTP.List() from some servers (MS FTP) then the listing is received as empty (no files) when in reality there are (non-hidden) files on the current directory. May this be a case of a missing parser? The funny think, when I use the program to get the list from MY server (MSFTP on W2003) everything seems OK but on some servers I've been hitting this problem.
Using latest Indy10 on D2010. Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
IdFTPListParseWindowsNT 已损坏。
由于解析错误,函数 CheckListing 返回 false:
注释此部分以使其像旧版本中一样工作,
可以解决您的问题。但不知道为什么要引入此更改。
IdFTPListParseWindowsNT is broken.
The function CheckListing returns false because of a bad parsing:
Commenting this part to make it work like in older versions
Showuld solve your problem. Don't know why this change was introduced, though.
这通常是由于目录列表中出现意外的情况导致列表解析器失败。 IIS 可能同时支持 NT 样式和 Unix 样式目录列表,因此请确保您的应用程序中包含这两种列表解析器,并使用
IdFTPLaistParse.pas::CheckListing
在它们之间进行选择。如果这没有帮助,则可能是一个愚蠢的日期或文件名中的某些内容;调试它的最佳方法是添加代码以将原始目录列表保存到文件中,以便最终用户可以向您发送副本。This is usually caused by something unexpected in the directory listing which makes the list parser fail. IIS might support both NT-style and Unix-style directory listings, so make sure that you're including both listing parsers in your application and picking between them using
IdFTPLaistParse.pas::CheckListing
. If that doesn't help it's probably a goofy date or a something in the filename; the best way to debug it is to add code to save the raw directory listing to a file so the end user can send you a copy.您确定确实可以建立数据连接吗?直接列出命令通常是第一次请求此类列表,如果您处于错误的模式,则通常是发生故障的点(即数据通道连接超时)。
Are you sure you can actually establish the data connection ? The directly listing command is usually the first occasion such a listing is requested and, if you're in the wrong mode, it's usually the point where the failure occurs (i.e. the data channel connection timesout).