From 5717ff883fa87b4d37c6b23c99bd6d7d11ad7237 Mon Sep 17 00:00:00 2001 From: murakami-ta Date: Thu, 24 Oct 2024 11:05:01 +0900 Subject: [PATCH] Support hyphens(`-`) in backup file name patterns --- .../src/main/java/org/komamitsu/fluency/buffer/FileBackup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluency-core/src/main/java/org/komamitsu/fluency/buffer/FileBackup.java b/fluency-core/src/main/java/org/komamitsu/fluency/buffer/FileBackup.java index 5e003951..b8e17eb0 100644 --- a/fluency-core/src/main/java/org/komamitsu/fluency/buffer/FileBackup.java +++ b/fluency-core/src/main/java/org/komamitsu/fluency/buffer/FileBackup.java @@ -54,7 +54,7 @@ public FileBackup(File backupDir, Buffer userBuffer, String prefix) this.backupDir = backupDir; this.userBuffer = userBuffer; this.prefix = prefix; - this.pattern = Pattern.compile(userBuffer.bufferFormatType() + prefix() + PARAM_DELIM_IN_FILENAME + "([\\w\\." + PARAM_DELIM_IN_FILENAME + "]+)" + EXT_FILENAME); + this.pattern = Pattern.compile(userBuffer.bufferFormatType() + prefix() + PARAM_DELIM_IN_FILENAME + "([\\w\\.\\-" + PARAM_DELIM_IN_FILENAME + "]+)" + EXT_FILENAME); LOG.debug(this.toString()); }