Changeset 77227 in vbox
- Timestamp:
- Feb 8, 2019 5:53:04 PM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r76626 r77227 324 324 325 325 void UIFileManagerGuestTable::copyHostToGuest(const QStringList &hostSourcePathList, 326 const QString &strDestination /* = QString() */)326 const QString &strDestination /* = QString() */) 327 327 { 328 328 if (!checkGuestSession()) 329 329 return; 330 330 QVector<QString> sourcePaths = hostSourcePathList.toVector(); 331 QVector<QString> aFilters; 332 QVector<QString> aFlags; 331 QVector<QString> aFilters; 332 aFilters.resize(sourcePaths.size()); /* Make sure to match the number of sources, even if empty. */ 333 QVector<QString> aFlags; 334 aFlags.resize(sourcePaths.size()); /* Ditto. */ 333 335 QString strDestinationPath = strDestination; 334 336 if (strDestinationPath.isEmpty()) … … 357 359 return; 358 360 QVector<QString> sourcePaths = selectedItemPathList().toVector(); 359 QVector<QString> aFilters; 360 QVector<QString> aFlags; 361 QVector<QString> aFilters; 362 aFilters.resize(sourcePaths.size()); /* Make sure to match the number of sources, even if empty. */ 363 QVector<QString> aFlags; 364 aFlags.resize(sourcePaths.size()); /* Ditto. */ 361 365 362 366 if (hostDestinationPath.isEmpty()) -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r77093 r77227 2907 2907 2908 2908 const size_t cSources = aSources.size(); 2909 if ( (aFilters.size() && aFilters.size() != cSources) 2910 || (aFlags.size() && aFlags.size() != cSources)) 2911 { 2912 return setError(E_INVALIDARG, tr("Parameter array sizes don't match to the number of sources specified")); 2909 if (!cSources) 2910 return setError(E_INVALIDARG, tr("No sources specified")); 2911 2912 if ( (aFilters.size() != cSources) 2913 || (aFlags.size() != cSources)) 2914 { 2915 return setError(E_INVALIDARG, tr("Filter / flag parameter array sizes don't match to the number of sources specified")); 2913 2916 } 2914 2917 … … 2986 2989 2987 2990 const size_t cSources = aSources.size(); 2988 if ( (aFilters.size() && aFilters.size() != cSources) 2989 || (aFlags.size() && aFlags.size() != cSources)) 2990 { 2991 return setError(E_INVALIDARG, tr("Parameter array sizes don't match to the number of sources specified")); 2991 if (!cSources) 2992 return setError(E_INVALIDARG, tr("No sources specified")); 2993 2994 if ( (aFilters.size() != cSources) 2995 || (aFlags.size() != cSources)) 2996 { 2997 return setError(E_INVALIDARG, tr("Filter / flag parameter array sizes don't match to the number of sources specified")); 2992 2998 } 2993 2999
Note:
See TracChangeset
for help on using the changeset viewer.