Closed
Description
Expected Behavior
chmod should need to work when the FileWritingMessageHandler's deleteSourceFiles property is true.
Current Behavior
When the deleteSourceFiles property of FileWritingMessageHandler is true, chmod does not work.
Context
My code is as follows:
@Bean
public IntegrationFlow pacToZipFlow(MessageChannel packToZipChannel, FileSynchronizerProperties fileSynchronizerProperties) {
return IntegrationFlow
.from(packToZipChannel)
.transformWith(transformer -> transformer.transformer(new ZipTransformer()))
.handle(Files
.outboundAdapter(new File(fileSynchronizerProperties.outputDirectory()))
.fileNameGenerator(message -> System.currentTimeMillis() + FileConsts.ZIP_FILE_SUFFIX)
.deleteSourceFiles(true)
.chmod(0700)
)
.get();
}
When deleteSourceFiles is true, the setPermissions(resultFile) method is not called in the handleFileMessage method of FileWritingMessageHandler.