Skip to content

Commit 6314da6

Browse files
author
Josh Greatrex
committed
Another Small change to file separator use
1 parent b4ffa53 commit 6314da6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/jftp/connection/SftpConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class SftpConnection implements Connection {
2121
private static final String COULD_NOT_FIND_FILE_MESSAGE = "Could not find file: %s";
2222
private static final String DIRECTORY_DOES_NOT_EXIST_MESSAGE = "Directory %s does not exist.";
2323
private static final String FILE_LISTING_ERROR_MESSAGE = "Unable to list files in directory %s";
24-
private static final String FILE_SEPARATOR = System.getProperty("file.separator");
24+
private static final String FILE_SEPARATOR = "/";
2525

2626
private static final int MILLIS = 1000;
2727

@@ -137,7 +137,7 @@ private String determineRemotePath(String localFilePath, String remoteDirectory)
137137
String safeRemotePath = remotePath.toString();
138138
String uploadAs = Paths.get(localFilePath).getFileName().toString();
139139

140-
return safeRemotePath + remotePath.getFileSystem().getSeparator() + uploadAs;
140+
return safeRemotePath + FILE_SEPARATOR + uploadAs;
141141
}
142142

143143
private FtpFile toFtpFile(LsEntry lsEntry, String filePath) throws SftpException {

0 commit comments

Comments
 (0)