summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/config
diff options
context:
space:
mode:
authorKeuin <[email protected]>2024-01-21 15:04:14 +0800
committerKeuin <[email protected]>2024-01-21 15:04:14 +0800
commitda48f1741ce8e6a3930fba3766bfa3451c96dd98 (patch)
tree57b86e9b900457c9aeff4ebf6a451a3f48f83374 /src/main/java/com/keuin/kbackupfabric/config
parent44227db56e3669b6b1575bf750df815e6903c906 (diff)
feature: validate configHEADmaster
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/config')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/config/KBackupConfig.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/config/KBackupConfig.java b/src/main/java/com/keuin/kbackupfabric/config/KBackupConfig.java
index 8ce5ed4..c47645b 100644
--- a/src/main/java/com/keuin/kbackupfabric/config/KBackupConfig.java
+++ b/src/main/java/com/keuin/kbackupfabric/config/KBackupConfig.java
@@ -38,6 +38,14 @@ public class KBackupConfig {
ObjectWriter w = om.writerWithDefaultPrettyPrinter();
w.writeValue(file, instance);
}
+ validate(instance);
+ }
+
+ private static void validate(KBackupConfig cfg) {
+ if (cfg.incbakCow == null) {
+ PrintUtil.warn("incbak_cow could not be null");
+ cfg.incbakCow = false;
+ }
}
public static void load() throws IOException {