From 44a40b845aeb759f80fb4ff1f0fca1a994dc79cd Mon Sep 17 00:00:00 2001 From: Michael Hillcox Date: Mon, 18 Mar 2024 10:43:01 +0000 Subject: [PATCH] fix: non-fatal error on settings migration system --- .../creeperlauncher/storage/settings/Settings.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/subprocess/src/main/java/net/creeperhost/creeperlauncher/storage/settings/Settings.java b/subprocess/src/main/java/net/creeperhost/creeperlauncher/storage/settings/Settings.java index 28586026..18957d7a 100644 --- a/subprocess/src/main/java/net/creeperhost/creeperlauncher/storage/settings/Settings.java +++ b/subprocess/src/main/java/net/creeperhost/creeperlauncher/storage/settings/Settings.java @@ -94,7 +94,13 @@ public static void attemptMigration() { LOGGER.error("Failed to delete old settings file.", e); } } catch (IOException e) { - throw new RuntimeException(e); + LOGGER.error("Failed to migrate settings file. Aborting migration process.", e); + LOGGER.info("Deleting old settings file. If possible"); + try { + Files.deleteIfExists(Constants.SETTINGS_FILE_LEGACY); + } catch (IOException ex) { + LOGGER.error("Failed to delete old settings file.", ex); + } } }