Fix moving of download to final directory.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 11 Apr 2013 19:52:58 +0000 (21:52 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 11 Apr 2013 19:52:58 +0000 (21:52 +0200)
src/main/java/net/pterodactylus/xdcc/core/Core.java

index 4314933..df6d278 100644 (file)
@@ -393,7 +393,7 @@ public class Core extends AbstractIdleService {
                try {
                        download.outputStream().close();
                        File file = new File(download.filename());
-                       file.renameTo(new File(finalDirectory, download.filename()));
+                       file.renameTo(new File(finalDirectory, download.pack().name()));
                        eventBus.post(new DownloadFinished(download));
                } catch (IOException ioe1) {
                        /* TODO - handle all the errors. */