提交 1466f312 编写于 作者: C Curtis Cablegram 提交者: José Valim

Change log-tailer to properly track multi-byte characters.

When end-of-line is represented within a file as "\r\n",
it is represented in memory as a single "\n".  This patch eliminates
the discrepancy between size on disk and size in memory.
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 2c8a4a53
......@@ -24,7 +24,7 @@ def tail!
if mod > @last_checked
contents = @file.read
@last_checked = mod
@cursor += contents.size
@cursor = @file.tell
$stdout.print contents
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册