Commit 010a323446ff46dc63e471f20fb04965cb45e696

  • Tree SHA1: 852a131
  • Parent SHA1: f7acb3d (INT-1708, INT-1709 added test to make sure that 'errorChannel' header takes precedence over 'error-channel' attribute)
  • raw diff | raw patch
INT-1742 fixed FTP rename functionality which does not play well with some of the FTP servers when rename-to file exists
spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpSession.java
(2 / 1)
  
7979 Assert.hasText(path, "path must not be null");
8080 boolean completed = client.storeFile(path, inputStream);
8181 if (!completed){
82 throw new IOException("Failed to write to '" + (path+FileWritingMessageHandler.TEMPORARY_FILE_SUFFIX)
82 throw new IOException("Failed to write to '" + path
8383 + "'. Server replied with: " + client.getReplyString());
8484 }
8585 logger.info("File have been successfully transfered to: " + path);
106106 }
107107
108108 public void rename(String pathFrom, String pathTo) throws IOException{
109 client.deleteFile(pathTo);
109110 boolean completed = client.rename(pathFrom, pathTo);
110111 if (!completed){
111112 throw new IOException("Failed to rename '" + pathFrom +

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment