fix: #690
This commit is contained in:
@@ -104,6 +104,8 @@ public class HMCLGameRepository extends DefaultGameRepository {
|
|||||||
|
|
||||||
if (dstDir.exists()) throw new IOException("Version exists");
|
if (dstDir.exists()) throw new IOException("Version exists");
|
||||||
FileUtils.copyDirectory(srcDir.toPath(), dstDir.toPath());
|
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();
|
VersionSetting oldVersionSetting = getVersionSetting(srcId).clone();
|
||||||
EnumGameDirectory originalGameDirType = oldVersionSetting.getGameDirType();
|
EnumGameDirectory originalGameDirType = oldVersionSetting.getGameDirType();
|
||||||
oldVersionSetting.setUsesGlobal(false);
|
oldVersionSetting.setUsesGlobal(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user