diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java index 6864c310f8..5513a6c43a 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java @@ -49,6 +49,7 @@ import org.springframework.util.ObjectUtils; */ public abstract class AbstractInboundFileSynchronizer implements InboundFileSynchronizer, InitializingBean { + private String remoteFileSeparator = "/"; /** * Extension used when downloading files. We change it right after we know it's downloaded. */ @@ -145,7 +146,7 @@ public abstract class AbstractInboundFileSynchronizer implements InboundFileS private void copyFileToLocalDirectory(String remoteDirectoryPath, F remoteFile, File localDirectory, Session session) throws IOException { String remoteFileName = this.getFilename(remoteFile); - String remoteFilePath = remoteDirectoryPath + File.separator + remoteFileName; + String remoteFilePath = remoteDirectoryPath + remoteFileSeparator + remoteFileName; if (!this.isFile(remoteFile)) { if (logger.isDebugEnabled()) { logger.debug("cannot copy, not a file: " + remoteFilePath);