From 5166dd818869a06b2d1e8e9a662abd6743ff5ece Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Fri, 23 Dec 2022 17:27:37 +0100 Subject: [PATCH] Ensuire Persist.dirtySince is not null even after file loading --- .../src/main/java/fr/pandacube/lib/core/backup/Persist.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/Persist.java b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/Persist.java index 1fed96d..5e6d33b 100644 --- a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/Persist.java +++ b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/Persist.java @@ -42,6 +42,10 @@ public class Persist { catch (final JsonParseException e) { Log.severe("cannot load " + file, e); } + finally { + if (dirtySince == null) + dirtySince = new HashMap<>(); + } if (!loaded) { save();