VirtualBox

Changeset 83320 in vbox


Ignore:
Timestamp:
Mar 19, 2020 9:18:05 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136513
Message:

Guest Control/Main: Resolved another @todo: Do validation of GuestSession::i_copyToGuest() parameters on caller side.

File:
1 edited

Legend:

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

    r83309 r83320  
    796796    LogFlowThisFuncEnter();
    797797
    798     /* Validate stuff. */
    799 /** @todo r=bird: these validations are better left to the caller.  The first one in particular as there is only one
    800  * of the four callers which supplies a user specified source set, making an assertion more appropriate and efficient
    801  * here. */
    802     if (RT_UNLIKELY(SourceSet.size() == 0)) /* At least one source must be present. */
    803         return setError(E_INVALIDARG, tr("No sources specified"));
    804     if (RT_UNLIKELY(SourceSet[0].strSource.isEmpty()))
    805         return setError(E_INVALIDARG, tr("First source entry is empty"));
    806     if (RT_UNLIKELY(strDestination.isEmpty()))
    807         return setError(E_INVALIDARG, tr("No destination specified"));
    808 
    809     /* Create a task and return the progress obejct for it. */
     798    /* Create a task and return the progress object for it. */
    810799    GuestSessionTaskCopyTo *pTask = NULL;
    811800    try
     
    31983187    }
    31993188
     3189    /* (Re-)Validate stuff. */
     3190    if (RT_UNLIKELY(SourceSet.size() == 0)) /* At least one source must be present. */
     3191        return setError(E_INVALIDARG, tr("No sources specified"));
     3192    if (RT_UNLIKELY(SourceSet[0].strSource.isEmpty()))
     3193        return setError(E_INVALIDARG, tr("First source entry is empty"));
     3194    if (RT_UNLIKELY(aDestination.isEmpty()))
     3195        return setError(E_INVALIDARG, tr("No destination specified"));
     3196
    32003197    return i_copyToGuest(SourceSet, aDestination, aProgress);
    32013198}
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