]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for file length fixup.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Thu, 28 Jan 2010 21:46:18 +0000 (21:46 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Thu, 28 Jan 2010 21:46:18 +0000 (21:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/tarstrm.cpp

index 16f96ecf1b7718ec8511a2d1aaf96263ee020cce..96e4eaffdfe5cd2c195351e16f400ccae005a925 100644 (file)
@@ -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