X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..931d6a47c32a5b4c283243cb553ce71ee2b535d5:/src/common/tarstrm.cpp diff --git a/src/common/tarstrm.cpp b/src/common/tarstrm.cpp index 16f96ecf1b..87074cc278 100644 --- a/src/common/tarstrm.cpp +++ b/src/common/tarstrm.cpp @@ -1,8 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tarstrm.cpp +// Name: src/common/tarstrm.cpp // Purpose: Streams for Tar files // Author: Mike Wetherell -// RCS-ID: $Id$ // Copyright: (c) 2004 Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -1307,6 +1306,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