From 11e1cc251166084c9b75956523437b4a77af74a3 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 6afe2ab0db..314fa0a34a 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. @@ -1017,9 +1017,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) { @@ -1035,6 +1033,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();