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 <[email protected]>
  • Loading branch information
ashie committed Dec 21, 2021
1 parent 787b74d commit 4241a51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/fluent/plugin/in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,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 @@ -434,7 +433,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 4241a51

Please sign in to comment.