From 6baece29cccc906651331cbf8a90a06f8cee045b Mon Sep 17 00:00:00 2001 From: Keuin Date: Thu, 14 Jan 2021 13:00:52 +0800 Subject: Fix a minor naming bug. Code refactor. Improve test. --- src/main/java/com/keuin/kbackupfabric/KBCommands.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/keuin/kbackupfabric/KBCommands.java') diff --git a/src/main/java/com/keuin/kbackupfabric/KBCommands.java b/src/main/java/com/keuin/kbackupfabric/KBCommands.java index 847fe7c..98f6369 100644 --- a/src/main/java/com/keuin/kbackupfabric/KBCommands.java +++ b/src/main/java/com/keuin/kbackupfabric/KBCommands.java @@ -84,7 +84,9 @@ public final class KBCommands { public static int list(CommandContext context) { MinecraftServer server = context.getSource().getMinecraftServer(); File[] files = getBackupSaveDirectory(server).listFiles( - (dir, name) -> dir.isDirectory() && name.toLowerCase().endsWith(".zip") && name.toLowerCase().startsWith(getBackupFileNamePrefix()) + (dir, name) -> dir.isDirectory() && + (name.toLowerCase().endsWith(".zip") && name.toLowerCase().startsWith(getBackupFileNamePrefix()) + || name.toLowerCase().endsWith(".kbi")) ); synchronized (backupFileNameList) { -- cgit v1.2.3