VirtualBox

Changeset 36326 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 21, 2011 2:48:23 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70655
Message:

Main/GuestCopy: Fixed copying of multiple of _64K files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp

    r36309 r36326  
    327327                            /* Did we reach the end of the content we want to transfer (last chunk)? */
    328328                            if (   (cbRead < _64K)
     329                                /* Did we reach the last block which is exactly _64K? */
     330                                || (cbToRead - cbRead == 0)
    329331                                /* ... or does the user want to cancel? */
    330332                                || (   SUCCEEDED(aTask->progress->COMGETTER(Canceled(&fCanceled)))
     
    636638
    637639                        /* Wait for process to exit ... */
    638                         SafeArray<BYTE> aInputData(_1M);
     640                        SafeArray<BYTE> aInputData(_64K);
    639641                        while (   SUCCEEDED(progressCat->COMGETTER(Completed(&fCompleted)))
    640642                               && !fCompleted)
     
    643645                            /* cbLength contains remaining bytes of our installer file
    644646                             * opened above to read. */
    645                             size_t cbToRead = RT_MIN(cbLength, _1M);
     647                            size_t cbToRead = RT_MIN(cbLength, _64K);
    646648                            if (cbToRead)
    647649                            {
     
    656658                                    /* Did we reach the end of the content we want to transfer (last chunk)? */
    657659                                    ULONG uFlags = ProcessInputFlag_None;
    658                                     if (   (cbRead < _1M)
     660                                    if (   (cbRead < _64K)
     661                                        /* Did we reach the last block which is exactly _64K? */
     662                                        || (cbToRead - cbRead == 0)
    659663                                        /* ... or does the user want to cancel? */
    660664                                        || (   SUCCEEDED(aTask->progress->COMGETTER(Canceled(&fCanceled)))
     
    19581962
    19591963                    if (!fCanceled)
    1960                     {   
     1964                    {
    19611965                        BOOL fCompleted;
    19621966                        if (   SUCCEEDED(it->second.pProgress->COMGETTER(Completed)(&fCompleted))
    19631967                            && fCompleted)
    19641968                        {
    1965                             AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);                       
     1969                            AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    19661970
    19671971                            PCALLBACKDATAEXECINSTATUS pStatusData = (PCALLBACKDATAEXECINSTATUS)it->second.pvData;
     
    19791983                                                  tr("Client error %u while processing input data"), pStatusData->u32Status);
    19801984                                    break;
    1981                             }                                                           
     1985                            }
    19821986                        }
    19831987                        else
Note: See TracChangeset for help on using the changeset viewer.

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