diff --git a/src/common/tarstrm.cpp b/src/common/tarstrm.cpp index 16f96ecf1b..96e4eaffdf 100644 --- a/src/common/tarstrm.cpp +++ b/src/common/tarstrm.cpp @@ -1307,6 +1307,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