mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fix a NPE which occured when there was no backups folder
This commit is contained in:
parent
a9c5e2a04f
commit
cd470d5497
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user