From 985fa4b53c66b7cf879f8747ce500fd77ebb84dd Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Thu, 29 May 2025 23:26:53 +1000 Subject: [PATCH] apparently . is converted into a folder and becomes .\ instead of .voxy --- .../me/cortex/voxy/client/VoxyClientInstance.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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; } /*