From 600cdf199f52e33cbe18856544d26c5d72cd4e94 Mon Sep 17 00:00:00 2001 From: XP Date: Fri, 17 Nov 2023 15:20:14 -0800 Subject: [PATCH] More update stuff --- .../src/main/java/gg/xp/xivsupport/gui/JavaUpdateUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/launcher/src/main/java/gg/xp/xivsupport/gui/JavaUpdateUtils.java b/launcher/src/main/java/gg/xp/xivsupport/gui/JavaUpdateUtils.java index 18533e366061..7cca104bc4d1 100644 --- a/launcher/src/main/java/gg/xp/xivsupport/gui/JavaUpdateUtils.java +++ b/launcher/src/main/java/gg/xp/xivsupport/gui/JavaUpdateUtils.java @@ -77,7 +77,10 @@ public void installVersion(int version, File realDestDir) throws IOException { zis.close(); } log("Moving into place"); - destDir.renameTo(realDestDir); + boolean moveResult = destDir.renameTo(realDestDir); + if (!moveResult) { + throw new RuntimeException("Could not rename %s -> %s".formatted(destDir, realDestDir)); + } log("JDK " + version + " successfully downloaded and extracted"); }