Skip to content

Commit

Permalink
in_tail: Remove a needless local variable
Browse files Browse the repository at this point in the history
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed May 17, 2022
1 parent b5d7a25 commit bd4782d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/fluent/plugin/in_tail.rb
Expand Up @@ -429,8 +429,7 @@ def construct_watcher(target_info)

# The file might be rotated or removed after collecting paths, so check inode again here.
begin
ino = Fluent::FileWrapper.stat(path).ino
target_info.ino = ino
target_info.ino = Fluent::FileWrapper.stat(path).ino
rescue Errno::ENOENT, Errno::EACCES
$log.warn "stat() for #{path} failed. Continuing without tailing it."
return
Expand All @@ -439,7 +438,7 @@ def construct_watcher(target_info)
pe = nil
if @pf
pe = @pf[target_info]
pe.update(ino, 0) if @read_from_head && pe.read_inode.zero?
pe.update(target_info.ino, 0) if @read_from_head && pe.read_inode.zero?
end

begin
Expand Down

0 comments on commit bd4782d

Please sign in to comment.