summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/KBCommands.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2020-04-24 17:48:26 +0800
committerkeuin <[email protected]>2020-04-24 17:48:26 +0800
commit474609422202ae33e1c941f67f000f9d88aa297c (patch)
tree02f303e2c94ec4d2ce6c887bd268406482ae09dd /src/main/java/com/keuin/kbackupfabric/KBCommands.java
parentea01faf3947814fe7ecaa3705e5fbf0f171f7e48 (diff)
Version 1.3.1-dev (BugFix)1.3.1-dev
Improve some info output. BugFix: Deleted backup won't immediately disappear in the suggestion list.
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/KBCommands.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/KBCommands.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/KBCommands.java b/src/main/java/com/keuin/kbackupfabric/KBCommands.java
index f2671ad..8a1a7cc 100644
--- a/src/main/java/com/keuin/kbackupfabric/KBCommands.java
+++ b/src/main/java/com/keuin/kbackupfabric/KBCommands.java
@@ -4,6 +4,7 @@ import com.keuin.kbackupfabric.metadata.BackupMetadata;
import com.keuin.kbackupfabric.metadata.MetadataHolder;
import com.keuin.kbackupfabric.operation.AbstractConfirmableOperation;
import com.keuin.kbackupfabric.util.BackupFilesystemUtil;
+import com.keuin.kbackupfabric.util.BackupNameSuggestionProvider;
import com.keuin.kbackupfabric.util.BackupNameTimeFormatter;
import com.keuin.kbackupfabric.util.PrintUtil;
import com.keuin.kbackupfabric.worker.BackupWorker;
@@ -209,9 +210,16 @@ public final class KBCommands {
msgWarn(context, "Nothing to be confirmed. Please execute /kb restore <backup_name> first.");
return FAILED;
}
+
AbstractConfirmableOperation operation = pendingOperation;
pendingOperation = null;
- return operation.confirm() ? SUCCESS : FAILED; // block compiler's complain.
+
+ boolean returnValue = operation.confirm();
+
+ // By the way, update suggestion list.
+ BackupNameSuggestionProvider.updateCandidateList();
+
+ return returnValue ? SUCCESS : FAILED; // block compiler's complain.
}
/**