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