VirtualBox

Changeset 78089 in vbox


Ignore:
Timestamp:
Apr 10, 2019 2:01:38 PM (6 years ago)
Author:
vboxsync
Message:

DnD/Main: Fixed copying 0-byte files from guest to host.

File:
1 edited

Legend:

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

    r78085 r78089  
    846846                rc = pObj->SetSize(cbSize);
    847847
    848             /** @todo Unescpae path before printing. */
     848            /** @todo Unescape path before printing. */
    849849            LogRel2(("DnD: Transferring guest file '%s' to host (%RU64 bytes, mode 0x%x)\n",
    850850                     pObj->GetDestPathAbs().c_str(), pObj->GetSize(), pObj->GetMode()));
     
    852852            /** @todo Set progress object title to current file being transferred? */
    853853
    854             if (!cbSize) /* 0-byte file? Close again. */
     854            if (pObj->IsComplete()) /* 0-byte file? We're done already. */
     855            {
     856                /** @todo Sanitize path. */
     857                LogRel2(("DnD: Transferring guest file '%s' (0 bytes) to host complete\n", pObj->GetDestPathAbs().c_str()));
     858
     859                pCtx->mURI.processObject(*pObj);
    855860                pObj->Close();
     861
     862                objCtx.reset();
     863            }
    856864        }
    857865
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