Fix optionsToLoad being changed when overwriting profile
This commit is contained in:
parent
4d05bb4958
commit
1526cb9694
1 changed files with 12 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue