Various code simplification/fixes and a lot of typo/grammar fixes (may brake some stuff)

This commit is contained in:
2023-06-20 00:15:46 +02:00
parent c984b63cee
commit 5edd8cdfec
151 changed files with 909 additions and 983 deletions

View File

@@ -6,10 +6,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
@SuppressWarnings("CanBeFinal")
public class BungeeBackupConfig {
public boolean workdirBackupEnabled = true;
public boolean logsBackupEnabled = true;
public String scheduling = "0 2 * * *"; // cron format, here is everyday at 2am
public String scheduling = "0 2 * * *"; // cron format, here is every day at 2am
public File backupDirectory = null;
public BackupCleaner workdirBackupCleaner = BackupCleaner.KEEPING_1_EVERY_N_MONTH(3).merge(BackupCleaner.KEEPING_N_LAST(5));
public List<String> workdirIgnoreList = new ArrayList<>();

View File

@@ -18,15 +18,12 @@ public class BungeeWorkdirProcess extends BackupProcess {
public BiPredicate<File, String> getFilenameFilter() {
return new BiPredicate<>() {
@Override
public boolean test(File file, String path) {
if (new File(getSourceDir(), "logs").equals(file))
return false;
if (file.isFile() && file.getName().endsWith(".lck"))
return false;
return BungeeWorkdirProcess.super.getFilenameFilter().test(file, path);
}
return (file, path) -> {
if (new File(getSourceDir(), "logs").equals(file))
return false;
if (file.isFile() && file.getName().endsWith(".lck"))
return false;
return BungeeWorkdirProcess.super.getFilenameFilter().test(file, path);
};
}