aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2023-03-18 12:35:33 +0100
committermakamys <makamys@outlook.com>2023-03-18 12:57:41 +0100
commit3b7c5e178a327e4370c75b9b3ecc0129605d8e0c (patch)
tree95d01ddffecbbe62c3516f6372e7e1ec91f5df4b /src/main/java/makamys/neodymium
parentfc17c93b52aa6dd377669fb097e90637699f5170 (diff)
downloadNeodymium-3b7c5e178a327e4370c75b9b3ecc0129605d8e0c.tar.gz
Neodymium-3b7c5e178a327e4370c75b9b3ecc0129605d8e0c.tar.bz2
Neodymium-3b7c5e178a327e4370c75b9b3ecc0129605d8e0c.zip
Fix error when config file doesn't exist yet
Diffstat (limited to 'src/main/java/makamys/neodymium')
-rw-r--r--src/main/java/makamys/neodymium/config/Config.java2
1 files changed, 1 insertions, 1 deletions
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;