From: David ‘Bombe’ Roden Date: Sat, 6 Nov 2021 23:26:23 +0000 (+0100) Subject: 🐛 Fix more wrong filenames X-Git-Url: https://git.pterodactylus.net/?p=xudocci.git;a=commitdiff_plain;h=1bfd1f9819b117291679aa292f11a84cf98f9774 🐛 Fix more wrong filenames --- 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());