From f0a9fca9524bd838e90e57eb94bdd617bab2d03c Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Wed, 10 May 2023 12:47:47 +0200 Subject: [PATCH] Create backup directory if needed --- .../main/java/fr/pandacube/lib/core/backup/BackupManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/BackupManager.java b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/BackupManager.java index 715f7fc..cea5bd5 100644 --- a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/BackupManager.java +++ b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/BackupManager.java @@ -38,6 +38,9 @@ public class BackupManager extends TimerTask { */ public BackupManager(File backupDirectory) { this.backupDirectory = backupDirectory; + if (!backupDirectory.exists()) { + backupDirectory.mkdirs(); + } persist = new Persist(this);