Summary: Changing TFileTransport to not go to end of file by default

Reviewed By: boz

Test Plan: compiled and tested falcon's print utility

Revert Plan: revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665167 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index 28a4261..51e9f08 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -742,6 +742,7 @@
   mode_t mode = readOnly_ ? S_IRUSR | S_IRGRP | S_IROTH : S_IRUSR | S_IWUSR| S_IRGRP | S_IROTH;
   int flags = readOnly_ ? O_RDONLY : O_RDWR | O_CREAT | O_APPEND;
   fd_ = ::open(filename_.c_str(), flags, mode);
+  offset_ = 0;
 
   // make sure open call was successful
   if(fd_ == -1) {
@@ -750,9 +751,6 @@
     GlobalOutput(errorMsg);
     throw TTransportException(errorMsg);
   }
-
-  // seek to the end of the file
-  offset_ = lseek(fd_, 0, SEEK_END);
 }
 
 void TFileTransport::getNextFlushTime(struct timespec* ts_next_flush) {