VirtualBox

Changeset 67220 in vbox for trunk


Ignore:
Timestamp:
Jun 1, 2017 8:39:43 PM (8 years ago)
Author:
vboxsync
Message:

tarvfswriter.cpp: Fixed sparse header bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/zip/tarvfswriter.cpp

    r67206 r67220  
    12121212    if (iSparse != 0)
    12131213    {
    1214         Assert(pThis->aHdrs[0].GnuSparse.isextended == 0);
    1215         rc = RTVfsIoStrmWrite(pThis->hVfsIos, &pThis->aHdrs[0], sizeof(pThis->aHdrs[0]), true /*fBlocking*/, NULL);
     1214        if (cSparse != RT_ELEMENTS(pThis->aHdrs[0].Gnu.sparse))
     1215            Assert(pThis->aHdrs[0].GnuSparse.isextended == 0);
     1216        else
     1217        {
     1218            Assert(pThis->aHdrs[0].Gnu.isextended == 0);
     1219            rc = rtZipTarFssWriter_ChecksumHdr(&pThis->aHdrs[0]);
     1220        }
     1221        if (RT_SUCCESS(rc))
     1222            rc = RTVfsIoStrmWrite(pThis->hVfsIos, &pThis->aHdrs[0], sizeof(pThis->aHdrs[0]), true /*fBlocking*/, NULL);
    12161223    }
    12171224    pThis->cHdrs = 0;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette