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 Aug 26, 2021
1 parent 28f12fc commit 62037cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/fluent/plugin/in_tail.rb
Expand Up @@ -409,8 +409,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 @@ -419,7 +418,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 62037cb

Please sign in to comment.