Skip to content
Snippets Groups Projects
Commit d96cb238 authored by Jan Kožusznik's avatar Jan Kožusznik
Browse files

Fix ScpClient

parent c4d6d78b
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
......@@ -208,7 +209,7 @@ public class ScpClient implements Closeable {
// send "C0644 filesize filename", where filename should not include '/'
long filesize = length;
command = "C0644 " + filesize + " ";
command += fileName;
command += Paths.get(fileName).getFileName().toString();
command += "\n";
out.write(command.getBytes());
out.flush();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment