🐛 Fix more wrong filenames
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 6 Nov 2021 23:26:23 +0000 (00:26 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 6 Nov 2021 23:26:23 +0000 (00:26 +0100)
src/main/java/net/pterodactylus/xdcc/core/Core.java

index c9c0218..98bd158 100644 (file)
@@ -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());