DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=34778>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34778 ------- Additional Comments From [EMAIL PROTECTED] 2006-08-30 09:37 ------- I'm having the same problem. After doing a FTP transfer the .changeWorkingDirectory method is not working properly. This is a sample: ftp = new FTPClient(); try { ftp.connect(update.getHost()); if (!ftp.login(update.getUsuario(), update.getPassword())) { ftp.logout(); logger.fatal("User/Pass invalid"); return false; } ftp.setFileType(FTP.BINARY_FILE_TYPE); ftp.enterLocalPassiveMode(); for (int i = 0; i < update.getFicheros().size(); i++) { UpdateFiles updatefiles = update.getFicheros().get(i); String ficheroOrigen = updatefiles.getOrigen().getPath() + "\\" + updatefiles.getOrigen().getFichero(); FileInputStream input = null; for (int j = 0; j < updatefiles.getDestinos().size(); j++) { input = new FileInputStream(ficheroOrigen); logger.info("Change to " + updatefiles.getDestinos().get(j).getPath()); if (ftp.changeWorkingDirectory(updatefiles.getDestinos().get(j).getPath())) { logger.info("Changed to " + ftp.printWorkingDirectory() + "."); OutputStream os = ftp.storeFileStream(updatefiles.getDestinos().get(j).getFichero()); if (os != null) { while ((read = input.read(buffer)) > 0) { os.write(buffer, 0, read); } os.flush(); os.close(); logger.info("Transfer OK. " + ftp.getStatus()); if (ftp.changeWorkingDirectory("/Test/test1")) logger.info("Changed to " + ftp.printWorkingDirectory()); else logger.info("Problems. Changed to " + ftp.printWorkingDirectory()); } else logger.fatal("Transfer Error."); } input.close(); } } logger.info("Logoff."); ftp.logout(); ftp.disconnect(); return true; } catch (FTPConnectionClosedException cce) { } catch (java.net.UnknownHostException uhe) { } catch (IOException ioe) { } catch (Exception exp) { } return false; } Logger output: Change to nq380000/DB Changed to ./nq380000/DB Transfer OK. 226 Transfer complete. // ftp.changeWorkingDirectory("/Test/test1") Changed to null Comments: This only happens after doing a Transfer. If I use .dele or .rename methods before a transfer and then I use the .changeWorkingDirectory this doesn't happens. I'm using commons-net-1.4.1.jar and JDK 1.5 The FTP Server is working on an Windows XP. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]