From d3daf59f2aaf71a9b24cf55048f933e4f20518b8 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Thu, 28 Jan 2010 21:46:09 +0000 Subject: [PATCH] Fix for file length fixup. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@63302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/tarstrm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/tarstrm.cpp b/src/common/tarstrm.cpp index d7c4d4ca86..e1ddbefa72 100644 --- a/src/common/tarstrm.cpp +++ b/src/common/tarstrm.cpp @@ -1299,6 +1299,11 @@ bool wxTarOutputStream::WriteHeaders(wxTarEntry& entry) m_tarsize += rounded; *m_extendedHdr = 0; + + // update m_headpos which is used to seek back to fix up the file + // length if it is not known in advance + if (m_tarstart != wxInvalidOffset) + m_headpos = m_tarstart + m_tarsize; } // if don't have extended headers just report error