"Remove" default serialization config from config

This commit is contained in:
mcrcortex
2025-01-31 04:37:09 +10:00
parent 72ef321bfb
commit 4d20f4747a

View File

@@ -35,10 +35,11 @@ public class VoxyConfig {
if (Files.exists(path)) {
try (FileReader reader = new FileReader(path.toFile())) {
var cfg = GSON.fromJson(reader, VoxyConfig.class);
if (cfg.defaultSaveConfig == null) {
//Shitty gson being a pain TODO: replace with a proper fix
cfg.defaultSaveConfig = ContextSelectionSystem.DEFAULT_STORAGE_CONFIG;
}
//TODO: dont always override it
cfg.defaultSaveConfig = ContextSelectionSystem.DEFAULT_STORAGE_CONFIG;
return cfg;
} catch (IOException e) {
System.err.println("Could not parse config");