Skip to content

Commit

Permalink
Merge pull request #1597 from t-osakada/fix-excluded-path
Browse files Browse the repository at this point in the history
in_tail: There are cases where the excluded_path doesn't apply by timing.
  • Loading branch information
repeatedly authored Jun 21, 2017
2 parents 317235d + 2117863 commit a1b7f51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def expand_paths
date = Time.now
paths = []

excluded = @exclude_path.map { |path| path = date.strftime(path); path.include?('*') ? Dir.glob(path) : path }.flatten.uniq
@paths.each { |path|
path = date.strftime(path)
if path.include?('*')
Expand All @@ -214,6 +213,7 @@ def expand_paths
paths << path
end
}
excluded = @exclude_path.map { |path| path = date.strftime(path); path.include?('*') ? Dir.glob(path) : path }.flatten.uniq
paths - excluded
end

Expand Down

0 comments on commit a1b7f51

Please sign in to comment.