VirtualBox

Changeset 55271 in vbox


Ignore:
Timestamp:
Apr 15, 2015 9:25:29 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99589
Message:

Storage: Calculate progress based on the real file size instead of virtual disk size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VD.cpp

    r54835 r55271  
    87288728                /* Get size of image. */
    87298729                uint64_t cbSize = pImage->Backend->pfnGetSize(pImage->pBackendData);
     8730                uint64_t cbSizeFile = pImage->Backend->pfnGetFileSize(pImage->pBackendData);
     8731                uint64_t cbFileWritten = 0;
    87308732                uint64_t uOffset = 0;
    87318733                uint64_t cbRemaining = cbSize;
     
    87708772                            break;
    87718773                        Assert(cbThisWrite == cbThisRead);
     8774                        cbFileWritten += cbThisWrite;
    87728775                    }
    87738776                    else
     
    87808783                    {
    87818784                        rc2 = pIfProgress->pfnProgress(pIfProgress->Core.pvUser,
    8782                                                        uPercentStart + uOffset * uPercentSpan / cbSize);
     8785                                                       uPercentStart + cbFileWritten * uPercentSpan / cbSizeFile);
    87838786                        AssertRC(rc2); /* Cancelling this operation without leaving an inconsistent state is not possible. */
    87848787                    }
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