mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-28 11:37:39 +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 amountTotal = 0;
|
||||||
int amountDeleted = 0;
|
int amountDeleted = 0;
|
||||||
|
|
||||||
|
if (BACKUP_DIR.listFiles() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check files in backup folder from oldest to newest
|
// Check files in backup folder from oldest to newest
|
||||||
for (File file : BACKUP_DIR.listFiles()) {
|
for (File file : BACKUP_DIR.listFiles()) {
|
||||||
if (!file.isFile()) {
|
if (!file.isFile()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user