Fix optionsToLoad being changed when overwriting profile

This commit is contained in:
axolotlmaid 2024-07-14 02:07:34 +01:00
parent 4d05bb4958
commit 1526cb9694

View file

@ -121,6 +121,7 @@ public class Profiles {
copyOptionFile(profile, EMBEDDIUM_OPTIONS_FILE);
copyOptionFile(profile, DISTANT_HORIZONS_OPTIONS_FILE);
if (!overwriting) {
// Add every option value to configuration
try (Stream<String> lines = Files.lines(profileOptions)) {
List<String> optionsToLoad = profileConfiguration.getOptionsToLoad();
@ -135,6 +136,7 @@ public class Profiles {
OptionsProfilesMod.LOGGER.error("[Profile '{}']: An error occurred when adding options to the configuration file", profileName, e);
}
}
}
public static boolean isProfileLoaded(String profileName) {
Path profile = PROFILES_DIRECTORY.resolve(profileName);