Skip to content

Commit 57ac519

Browse files
xpierrohkxpierrohk
authored andcommitted
Fixes #4
1 parent 1e097a5 commit 57ac519

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/main/java/net/sony/dpt/ui/cli/DigitalPaperCLI.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,11 +565,12 @@ private void wifiScan() throws IOException, InterruptedException {
565565
accessPointList.getAccessPoints().forEach(accessPoint -> logWriter.log(accessPoint.getDecodedSSID()));
566566
}
567567

568-
private void upload(String localPath, String remotePath) throws IOException, InterruptedException {
568+
private void upload(String local, String remotePath) throws IOException, InterruptedException {
569+
Path localPath = Path.of(local);
569570
if (remotePath == null) {
570-
remotePath = "Document/" + localPath;
571+
remotePath = "Document/Received" + localPath.getFileName();
571572
}
572-
new DocumentCommand(digitalPaperEndpoint).upload(Path.of(localPath), Path.of(remotePath));
573+
new DocumentCommand(digitalPaperEndpoint).upload(localPath, Path.of(remotePath));
573574
}
574575

575576
private void deleteFolder(String remotePath) throws IOException, InterruptedException {

0 commit comments

Comments
 (0)