Skip to content

Commit

Permalink
in_tail: Add comments to describe why we don't return true when alway…
Browse files Browse the repository at this point in the history
…s option is chosen

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Apr 4, 2024
1 parent be394fc commit 298a24b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 298a24b

Please sign in to comment.