From e894e00ff7e6770a3af8c04830dcb33692e4e8c8 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 5 Feb 2021 17:01:26 -0500 Subject: [PATCH] Fix code typo from the previous commit **Cherry-pick to 5.3.x** --- .../remote/gateway/AbstractRemoteFileOutboundGateway.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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();