diff --git a/client/src/main/java/envoy/client/ui/listcell/MessageControl.java b/client/src/main/java/envoy/client/ui/listcell/MessageControl.java index 0c0d91b..eec8612 100644 --- a/client/src/main/java/envoy/client/ui/listcell/MessageControl.java +++ b/client/src/main/java/envoy/client/ui/listcell/MessageControl.java @@ -132,7 +132,7 @@ public class MessageControl extends Label { fileChooser.setInitialFileName(fileName); fileChooser.setInitialDirectory(downloadLocation); file = fileChooser.showSaveDialog(sceneContext.getStage()); - } else file = new File(downloadLocation + (downloadLocation.getName().endsWith("/") ? "" : "/") + fileName); + } else file = new File(downloadLocation, fileName); // A file was selected if (file != null) try (FileOutputStream fos = new FileOutputStream(file)) { diff --git a/client/src/main/java/envoy/client/ui/settings/DownloadSettingsPane.java b/client/src/main/java/envoy/client/ui/settings/DownloadSettingsPane.java index c97cdd4..bdc1352 100644 --- a/client/src/main/java/envoy/client/ui/settings/DownloadSettingsPane.java +++ b/client/src/main/java/envoy/client/ui/settings/DownloadSettingsPane.java @@ -23,7 +23,7 @@ import envoy.client.ui.SceneContext; public class DownloadSettingsPane extends SettingsPane { /** - * Constructs a new {@code DownloadSettingsPane} + * Constructs a new {@code DownloadSettingsPane}. * * @param sceneContext the {@code SceneContext} used to block input to the * {@link javafx.stage.Stage} used in Envoy @@ -62,5 +62,4 @@ public class DownloadSettingsPane extends SettingsPane { vbox.getChildren().add(hbox); getChildren().add(vbox); } - } diff --git a/common/src/main/java/envoy/data/Attachment.java b/common/src/main/java/envoy/data/Attachment.java index 67fca01..e231a76 100644 --- a/common/src/main/java/envoy/data/Attachment.java +++ b/common/src/main/java/envoy/data/Attachment.java @@ -68,8 +68,8 @@ public class Attachment implements Serializable { */ public Attachment(byte[] data, String name, AttachmentType type) { this.data = data; - this.type = type; this.name = name; + this.type = type; } /**