GH-3026 Support chmod with FTP

Resolves https://github.com/spring-projects/spring-integration/issues/3026

* Fix exception messages; remove test TODOs; test works on Windows

# Conflicts:
#	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpServerOutboundTests.java
#	src/reference/asciidoc/whats-new.adoc
This commit is contained in:
Gary Russell
2019-08-15 17:38:24 -04:00
committed by Artem Bilan
parent f7032c7127
commit b04a8576fa
11 changed files with 94 additions and 10 deletions

View File

@@ -158,7 +158,8 @@ public class SftpOutboundGateway extends AbstractRemoteFileOutboundGateway<LsEnt
client.chmod(chmod, path);
}
catch (SftpException e) {
throw new GeneralSftpException("Failed to execute chmod", e);
throw new GeneralSftpException(
"Failed to execute 'chmod " + Integer.toOctalString(chmod) + " " + path + "'", e);
}
});
}

View File

@@ -78,7 +78,8 @@ public class SftpMessageHandler extends FileTransferringMessageHandler<LsEntry>
client.chmod(chmod, path);
}
catch (SftpException e) {
throw new GeneralSftpException("Failed to execute chmod", e);
throw new GeneralSftpException(
"Failed to execute 'chmod " + Integer.toOctalString(chmod) + " " + path + "'", e);
}
});
}