diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/gateway/AbstractRemoteFileOutboundGateway.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/gateway/AbstractRemoteFileOutboundGateway.java index 54d86e81ca..7af96d235e 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/gateway/AbstractRemoteFileOutboundGateway.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/gateway/AbstractRemoteFileOutboundGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1019,9 +1019,7 @@ public abstract class AbstractRemoteFileOutboundGateway extends AbstractReply if ((this.options.contains(Option.SUBDIRS) || !isDirectory) && (!isDots || this.options.contains(Option.ALL))) { - else if (this.options.contains(Option.ALL) || !isDots) { - lsFiles.add(file); - } + lsFiles.add(fileToAdd); } if (recursion && isDirectory && !isDots) { @@ -1037,6 +1035,7 @@ public abstract class AbstractRemoteFileOutboundGateway extends AbstractReply || fileName.endsWith(fileSeparator + ".") || fileName.endsWith(fileSeparator + ".."); } + protected final List filterMputFiles(File[] files) { if (files == null) { return Collections.emptyList();