From 511b555255c37f7e6b82dd50f68ca2c569d69a7b Mon Sep 17 00:00:00 2001 From: huanghongxun Date: Thu, 26 Mar 2020 18:54:26 +0800 Subject: [PATCH] fix: #690 --- .../main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java b/HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java index 899fc1262..1e5bc3a99 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java @@ -104,6 +104,8 @@ public class HMCLGameRepository extends DefaultGameRepository { if (dstDir.exists()) throw new IOException("Version exists"); FileUtils.copyDirectory(srcDir.toPath(), dstDir.toPath()); + Files.move(dstDir.toPath().resolve(srcId + ".jar"), dstDir.toPath().resolve(dstId + ".jar")); + Files.move(dstDir.toPath().resolve(srcId + ".json"), dstDir.toPath().resolve(dstId + ".json")); VersionSetting oldVersionSetting = getVersionSetting(srcId).clone(); EnumGameDirectory originalGameDirType = oldVersionSetting.getGameDirType(); oldVersionSetting.setUsesGlobal(false);