From a36b8ec1f27c2cadb5d160375546a8bf5ce1fcd5 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sat, 31 Dec 2022 01:11:45 +0100 Subject: [PATCH] Create directory for logs backup --- .../fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java index 57cc47c..4e59765 100644 --- a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java +++ b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java @@ -57,6 +57,7 @@ public class RotatedLogsBackupProcess extends BackupProcess { boolean success = false; File targetDir = getTargetDir(); + targetDir.mkdirs(); try { List filesToMove = getFilesToMove(); @@ -65,7 +66,7 @@ public class RotatedLogsBackupProcess extends BackupProcess { try { Files.move(source, new File(targetDir, source.getName())); } catch (IOException e) { - Log.severe("Unable to move file " + source + " into " + targetDir); + Log.severe("Unable to move file " + source + " into " + targetDir, e); } }