diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index 7a9b53d529..2a0350aa14 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -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 @@ -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