From 3b7c5e178a327e4370c75b9b3ecc0129605d8e0c Mon Sep 17 00:00:00 2001 From: makamys Date: Sat, 18 Mar 2023 12:35:33 +0100 Subject: Fix error when config file doesn't exist yet --- src/main/java/makamys/neodymium/config/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/makamys/neodymium') diff --git a/src/main/java/makamys/neodymium/config/Config.java b/src/main/java/makamys/neodymium/config/Config.java index 8ae3f79..32d2c22 100644 --- a/src/main/java/makamys/neodymium/config/Config.java +++ b/src/main/java/makamys/neodymium/config/Config.java @@ -92,7 +92,7 @@ public class Config { public static void reloadConfig(ReloadInfo info) { try { - if(Files.size(configFile.toPath()) == 0) { + if(configFile.exists() && Files.size(configFile.toPath()) == 0) { // Sometimes the watcher fires twice, and the first time the file is empty. // I don't know why. This is the workaround. return; -- cgit