From 1bfd1f9819b117291679aa292f11a84cf98f9774 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 7 Nov 2021 00:26:23 +0100 Subject: [PATCH] =?utf8?q?=F0=9F=90=9B=20Fix=20more=20wrong=20filenames?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index c9c0218..98bd158 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -915,11 +915,11 @@ public class Core extends AbstractExecutionThreadService { eventBus.post(new GenericMessage("d")); Download download = openDownloads.stream() - .filter(it -> it.filename().equals(dccSendReceived.filename())) + .filter(it -> Objects.equals(it.filename(), dccSendReceived.filename())) .findFirst() .orElse(openDownloads.iterator().next()); eventBus.post(new GenericMessage("e")); - eventBus.post(new GenericMessage(format("Downloading %s from %s as %s.", dccSendReceived.filename(), dccSendReceived.source(), download.filename()))); + eventBus.post(new GenericMessage(format("Downloading %s from %s as %s.", dccSendReceived.filename(), dccSendReceived.source(), download.pack().name()))); /* check if the file already exists. */ File outputFile = new File(temporaryDirectory, dccSendReceived.filename()); -- 2.7.4