From 58500e976364aea0df156a08b6c0336f6da26cd1 Mon Sep 17 00:00:00 2001 From: Aditya Agarwal Date: Tue, 26 Jun 2007 02:57:04 +0000 Subject: [PATCH] -- make sure TFileTransport always starts at EOF Reviewed By: jwang Test Plan: search git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665143 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/src/transport/TFileTransport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp index 7a1ca4f7..28a42615 100644 --- a/lib/cpp/src/transport/TFileTransport.cpp +++ b/lib/cpp/src/transport/TFileTransport.cpp @@ -751,8 +751,8 @@ void TFileTransport::openLogFile() { throw TTransportException(errorMsg); } - // opening the file in append mode causes offset_t to be at the end - offset_ = lseek(fd_, 0, SEEK_CUR); + // seek to the end of the file + offset_ = lseek(fd_, 0, SEEK_END); } void TFileTransport::getNextFlushTime(struct timespec* ts_next_flush) { -- 2.17.1