diff --git a/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java b/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java index bf4a193a..c4340034 100644 --- a/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java +++ b/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java @@ -85,16 +85,13 @@ public class VoxyClientInstance extends VoxyInstance { } } - try { + if (config == null) { config = DEFAULT_STORAGE_CONFIG; - - try { - Files.writeString(json, Serialization.GSON.toJson(config)); - } catch (IOException e) { - throw new RuntimeException(e); - } + } + try { + Files.writeString(json, Serialization.GSON.toJson(config)); } catch (Exception e) { - throw new RuntimeException("Failed to deserialize the default config, aborting!", e); + throw new RuntimeException("Failed write the config, aborting!", e); } if (config == null) { throw new IllegalStateException("Config is still null\n"); @@ -150,7 +147,7 @@ public class VoxyClientInstance extends VoxyInstance { } } } - return basePath.toAbsolutePath(); + return basePath; } /*