summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-14 13:00:52 +0800
committerkeuin <[email protected]>2021-01-14 13:00:52 +0800
commit6baece29cccc906651331cbf8a90a06f8cee045b (patch)
tree37a33912b7b057376a4c2845738f076ac7da3467 /src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java
parent5410762b8272feca0680f7a48f895714b91e3df7 (diff)
Fix a minor naming bug.
Code refactor. Improve test.
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java b/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java
index 3c35201..926f47c 100644
--- a/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java
+++ b/src/main/java/com/keuin/kbackupfabric/util/backup/name/IncrementalBackupFileNameEncoder.java
@@ -24,7 +24,7 @@ public class IncrementalBackupFileNameEncoder implements BackupFileNameEncoder {
@Override
public BackupFileNameEncoder.BackupBasicInformation decode(String fileName) {
Pattern pattern = Pattern.compile(
- backupFileNamePrefix + "-" + "([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2})_(.+)\\.kbi"
+ "^" + backupFileNamePrefix + "-" + "([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2})_(.+)\\.kbi" + "$"
);
Matcher matcher = pattern.matcher(fileName);
if (matcher.find()) {