-- 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
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index 7a1ca4f..28a4261 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -751,8 +751,8 @@
     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) {