[jira] Commented: (NET-143) FTPClient.listFiles(String pathname) returns no entry on RH AS 4
[ http://issues.apache.org/jira/browse/NET-143?page=comments#action_12458232 ] Daniel Savarese commented on NET-143: - The issue you describe is not a bug and is not related to Commons Net. It is an FTP server configuration issue if you want an absolute path like /abc to be interpreted relative to some other directory. If you want to use relative paths, change directories first. FTPClient.listFiles(String pathname) returns no entry on RH AS 4 Key: NET-143 URL: http://issues.apache.org/jira/browse/NET-143 Project: Commons Net Issue Type: Bug Affects Versions: 1.4 Final Environment: RedHat AS 4 Reporter: Felix Wong The following code snippet works fine on RedHat AS 3 ftp server. However, it only works on the top level of a RedHat AS 4 ftp server (e.g. ftp://myftpserver) but not on any subdirectory. ftpClient.listFiles(url.getPath()) return an empty array on any subdirectory (e.g. ftp://myftpserver/abc). URL url = new URL(urlString); FTPClient ftpClient = new FTPClient(); FTPFile[] ftpFiles; ftpClient.connect(url.getHost()); ftpClient.login(username, password); int rc = ftpClient.getReplyCode(); if (!FTPReply.isPositiveCompletion(rc)) { throw new Exception(ftpClient.getReplyString()); } ftpFiles = ftpClient.listFiles(url.getPath()); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (NET-143) FTPClient.listFiles(String pathname) returns no entry on RH AS 4
[ http://issues.apache.org/jira/browse/NET-143?page=comments#action_12457963 ] Felix Wong commented on NET-143: Acutally, the code snippet reported here worked on AIX and Windows ftp server but not on Linux 3 and 4. With the help of the trace from PrintCommandListener, I have found the problem. I was trying to get the files under ftp://xxx:[EMAIL PROTECTED]/abc. I used ftp://myftpserver; to connect and execute ftpClient.listFiles(/abc). On Windows, LIST /abc returned the files under the root of the ftp server. However, on Linux, LIST /abc was trying to list files under the filesystem's root rather than /home/xxx/abc. Is this still a problem of the Commons Net? FTPClient.listFiles(String pathname) returns no entry on RH AS 4 Key: NET-143 URL: http://issues.apache.org/jira/browse/NET-143 Project: Commons Net Issue Type: Bug Affects Versions: 1.4 Final Environment: RedHat AS 4 Reporter: Felix Wong The following code snippet works fine on RedHat AS 3 ftp server. However, it only works on the top level of a RedHat AS 4 ftp server (e.g. ftp://myftpserver) but not on any subdirectory. ftpClient.listFiles(url.getPath()) return an empty array on any subdirectory (e.g. ftp://myftpserver/abc). URL url = new URL(urlString); FTPClient ftpClient = new FTPClient(); FTPFile[] ftpFiles; ftpClient.connect(url.getHost()); ftpClient.login(username, password); int rc = ftpClient.getReplyCode(); if (!FTPReply.isPositiveCompletion(rc)) { throw new Exception(ftpClient.getReplyString()); } ftpFiles = ftpClient.listFiles(url.getPath()); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (NET-143) FTPClient.listFiles(String pathname) returns no entry on RH AS 4
[ http://issues.apache.org/jira/browse/NET-143?page=comments#action_12455831 ] Rory Winston commented on NET-143: -- Can you provide an output trace of the FTP conversation (using a PrintCommandListener)? FTPClient.listFiles(String pathname) returns no entry on RH AS 4 Key: NET-143 URL: http://issues.apache.org/jira/browse/NET-143 Project: Commons Net Issue Type: Bug Affects Versions: 1.4 Final Environment: RedHat AS 4 Reporter: Felix Wong The following code snippet works fine on RedHat AS 3 ftp server. However, it only works on the top level of a RedHat AS 4 ftp server (e.g. ftp://myftpserver) but not on any subdirectory. ftpClient.listFiles(url.getPath()) return an empty array on any subdirectory (e.g. ftp://myftpserver/abc). URL url = new URL(urlString); FTPClient ftpClient = new FTPClient(); FTPFile[] ftpFiles; ftpClient.connect(url.getHost()); ftpClient.login(username, password); int rc = ftpClient.getReplyCode(); if (!FTPReply.isPositiveCompletion(rc)) { throw new Exception(ftpClient.getReplyString()); } ftpFiles = ftpClient.listFiles(url.getPath()); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (NET-143) FTPClient.listFiles(String pathname) returns no entry on RH AS 4
[ http://issues.apache.org/jira/browse/NET-143?page=comments#action_12454057 ] Felix Wong commented on NET-143: Did anyone look at this? FTPClient.listFiles(String pathname) returns no entry on RH AS 4 Key: NET-143 URL: http://issues.apache.org/jira/browse/NET-143 Project: Commons Net Issue Type: Bug Affects Versions: 1.4 Final Environment: RedHat AS 4 Reporter: Felix Wong The following code snippet works fine on RedHat AS 3 ftp server. However, it only works on the top level of a RedHat AS 4 ftp server (e.g. ftp://myftpserver) but not on any subdirectory. ftpClient.listFiles(url.getPath()) return an empty array on any subdirectory (e.g. ftp://myftpserver/abc). URL url = new URL(urlString); FTPClient ftpClient = new FTPClient(); FTPFile[] ftpFiles; ftpClient.connect(url.getHost()); ftpClient.login(username, password); int rc = ftpClient.getReplyCode(); if (!FTPReply.isPositiveCompletion(rc)) { throw new Exception(ftpClient.getReplyString()); } ftpFiles = ftpClient.listFiles(url.getPath()); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]