From 06c33a47ad52fb7b79648daa79fdad66b45a70ae Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 18 Sep 2019 02:04:39 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20FileAlreadyExistsException?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pro/gravit/launcher/client/LauncherUpdateController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/LauncherUpdateController.java b/Launcher/src/main/java/pro/gravit/launcher/client/LauncherUpdateController.java index 7918a20a..51eb2939 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/LauncherUpdateController.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/LauncherUpdateController.java @@ -76,6 +76,7 @@ public void postDiff(UpdateRequest request, UpdateRequestEvent e, HashedDir.Diff LogHelper.debug("Copy file %s to %s", ret.toAbsolutePath().toString(), source.toAbsolutePath().toString()); } //Let's go! + Files.deleteIfExists(source); Files.copy(ret, source); try (InputStream input = IOHelper.newInput(ret)) { IOHelper.transfer(input, source);