From a9c5e2a04f852ece7edee0bf68c468fef78652a4 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 2 Nov 2013 21:50:49 +0100 Subject: [PATCH] Don't send a message to the console if no backups were deleted --- .../com/gmail/nossr50/runnables/backups/CleanBackupsTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/runnables/backups/CleanBackupsTask.java b/src/main/java/com/gmail/nossr50/runnables/backups/CleanBackupsTask.java index 5ce8d9e87..5011bc23d 100644 --- a/src/main/java/com/gmail/nossr50/runnables/backups/CleanBackupsTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/backups/CleanBackupsTask.java @@ -67,6 +67,10 @@ public class CleanBackupsTask extends BukkitRunnable { toDelete.add(file); } + if (toDelete.isEmpty()) { + return; + } + mcMMO.p.getLogger().info("Cleaning backup files... (" + amountDeleted + "/" + amountTotal + ")"); for (File file : toDelete) {