lib/fluent/plugin/in_tail.rb in fluentd-0.10.9 vs lib/fluent/plugin/in_tail.rb in fluentd-0.10.10
- old
+ new
@@ -107,11 +107,11 @@
return @parser.parse(line)
end
class Handler < Coolio::StatWatcher
def initialize(path, pe, callback)
- stat = File.lstat(path)
+ stat = File.stat(path)
@pe = pe
@inode = stat.ino
if @inode == @pe.read_inode
# seek to the saved position
@pos = @pe.read_pos
@@ -129,10 +129,10 @@
def on_change(prev, cur)
lines = []
inode = nil
File.open(path) {|f|
- stat = f.lstat
+ stat = f.stat
inode = stat.ino
if @inode != inode || stat.size < @pos
# moved or deleted
@pos = 0