VirtualBox

Changeset 83606 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Apr 7, 2020 11:57:30 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137011
Message:

Guest Control/Main: Check if destination/source entries in Copy[To|From] tasks are not empty. bugref:9320

File:
1 edited

Legend:

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

    r83489 r83606  
    14061406     */
    14071407
     1408    if (mDest.isEmpty())
     1409        return setProgressErrorMsg(VBOX_E_IPRT_ERROR, Utf8StrFmt(GuestSession::tr("Destination must not be empty")));
     1410
    14081411    GuestSessionFsSourceSet::iterator itSrc = mSources.begin();
    14091412    while (itSrc != mSources.end())
     
    14131416
    14141417        bool    fFollowSymlinks;
     1418
     1419        if (strSrc.isEmpty())
     1420        {
     1421            strErrorInfo = Utf8StrFmt(GuestSession::tr("Source entry must not be empty"));
     1422            break;
     1423        }
    14151424
    14161425        if (itSrc->enmType == FsObjType_Directory)
     
    16541663     */
    16551664
     1665    if (mDest.isEmpty())
     1666        return setProgressErrorMsg(VBOX_E_IPRT_ERROR, Utf8StrFmt(GuestSession::tr("Destination must not be empty")));
     1667
    16561668    GuestSessionFsSourceSet::iterator itSrc = mSources.begin();
    16571669    while (itSrc != mSources.end())
     
    16611673
    16621674        LogFlowFunc(("Source: strSrc=%s, strDst=%s\n", strSrc.c_str(), strDst.c_str()));
     1675
     1676        if (strSrc.isEmpty())
     1677        {
     1678            strErrorInfo = Utf8StrFmt(GuestSession::tr("Source entry must not be empty"));
     1679            break;
     1680        }
    16631681
    16641682        RTFSOBJINFO srcFsObjInfo;
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