From 298a24b289f435ba77ae408720e9b75164f9af95 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Thu, 4 Apr 2024 18:35:04 +0900 Subject: [PATCH] in_tail: Add comments to describe why we don't return true when always option is chosen Signed-off-by: Hiroshi Hatake --- lib/fluent/plugin/in_tail.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index 0f9c3865dd..a13fec4ff3 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -301,6 +301,10 @@ def extended_glob_pattern(path) # This should be collided for wildcard pattern for curly braces. def use_glob?(path) if @glob_policy == :always + # For future extensions, we decided to use `always' term to handle + # regular expressions as much as possible. + # This is because not using `true' as a returning value + # when choosing :always here. extended_glob_pattern(path) || /\{.*,.*\}/.match(path) elsif @glob_policy == :extended extended_glob_pattern(path)