Fix a NPE which occured when there was no backups folder

This commit is contained in:
TfT_02 2013-11-03 14:09:41 +01:00
parent a9c5e2a04f
commit cd470d5497

View File

@ -26,6 +26,10 @@ public class CleanBackupsTask extends BukkitRunnable {
int amountTotal = 0;
int amountDeleted = 0;
if (BACKUP_DIR.listFiles() == null) {
return;
}
// Check files in backup folder from oldest to newest
for (File file : BACKUP_DIR.listFiles()) {
if (!file.isFile()) {