Skip to content

When deleteSourceFiles is true, the setPermissions method of FileWritingMessageHandler should be called. #9294

Closed
@coverseed

Description

@coverseed

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions