Index: trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 72015)
+++ trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 72023)
@@ -1344,167 +1344,4 @@
 }
 
-#if 0
-/**
- * Copys a directory (tree) from guest to the host.
- *
- * @return  IPRT status code.
- * @param   strSource               Source directory on the guest to copy to the host.
- * @param   strFilter               DOS-style wildcard filter (?, *).  Optional.
- * @param   strDest                 Destination directory on the host.
- * @param   fRecursive              Whether to recursively copy the directory contents or not.
- * @param   fFollowSymlinks         Whether to follow symlinks or not.
- * @param   strSubDir               Current sub directory to handle. Needs to NULL and only
- *                                  is needed for recursion.
- */
-int SessionTaskCopyDirFrom::directoryCopyToHost(const Utf8Str &strSource, const Utf8Str &strFilter,
-                                                const Utf8Str &strDest, bool fRecursive, bool fFollowSymlinks,
-                                                const Utf8Str &strSubDir /* For recursion. */)
-{
-    Utf8Str strSrcDir    = strSource;
-    Utf8Str strDstDir    = strDest;
-    Utf8Str strSrcSubDir = strSubDir;
-
-    /* Validation and sanity. */
-    if (   !strSrcDir.endsWith("/")
-        && !strSrcDir.endsWith("\\"))
-        strSrcDir += "/";
-
-    if (   !strDstDir.endsWith("/")
-        && !strDstDir.endsWith("\\"))
-        strDstDir+= "/";
-
-    if (    strSrcSubDir.isNotEmpty() /* Optional, for recursion. */
-        && !strSrcSubDir.endsWith("/")
-        && !strSrcSubDir.endsWith("\\"))
-        strSrcSubDir += "/";
-
-    Utf8Str strSrcCur = strSrcDir + strSrcSubDir;
-
-    LogFlowFunc(("strSrcDir=%s, strDstDir=%s, strFilter=%s, strSubDir=%s\n",
-                 strSrcDir.c_str(), strDstDir.c_str(), strFilter.c_str(), strSubDir.c_str()));
-
-    int rc;
-
-    if (strSrcSubDir.isNotEmpty())
-    {
-        const uint32_t fMode = 0700; /** @todo */
-
-        rc = RTDirCreate(Utf8Str(strDstDir + strSrcSubDir).c_str(), fMode, 0);
-        if (RT_FAILURE(rc))
-            return rc;
-    }
-
-    GuestDirectoryOpenInfo dirOpenInfo;
-    dirOpenInfo.mFilter = strFilter;
-    dirOpenInfo.mPath   = strSrcCur;
-    dirOpenInfo.mFlags  = 0; /** @todo Handle flags? */
-
-    ComObjPtr <GuestDirectory> pDir; int rcGuest;
-    rc = mSession->i_directoryOpen(dirOpenInfo, pDir, &rcGuest);
-
-    if (RT_FAILURE(rc))
-    {
-        switch (rc)
-        {
-            case VERR_INVALID_PARAMETER:
-               setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Opening directory \"%s\" failed: Invalid parameter"), dirOpenInfo.mPath.c_str()));
-               break;
-
-            case VERR_GSTCTL_GUEST_ERROR:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
-                break;
-
-            default:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Opening directory \"%s\" failed: %Rrc"), dirOpenInfo.mPath.c_str(), rc));
-                break;
-        }
-
-        return rc;
-    }
-
-    ComObjPtr<GuestFsObjInfo> fsObjInfo;
-    while (RT_SUCCESS(rc = pDir->i_readInternal(fsObjInfo, &rcGuest)))
-    {
-        FsObjType_T enmObjType = FsObjType_Unknown; /* Shut up MSC. */
-        HRESULT hr2 = fsObjInfo->COMGETTER(Type)(&enmObjType);
-        AssertComRC(hr2);
-
-        com::Bstr bstrName;
-        hr2 = fsObjInfo->COMGETTER(Name)(bstrName.asOutParam());
-        AssertComRC(hr2);
-
-        Utf8Str strName(bstrName);
-
-        switch (enmObjType)
-        {
-            case FsObjType_Directory:
-            {
-                bool fSkip = false;
-
-                if (   strName.equals(".")
-                    || strName.equals(".."))
-                {
-                    fSkip = true;
-                }
-
-                if (   strFilter.isNotEmpty()
-                    && !RTStrSimplePatternMatch(strFilter.c_str(), strName.c_str()))
-                    fSkip = true;
-
-                if (   fRecursive
-                    && !fSkip)
-                    rc = directoryCopyToHost(strSrcDir, strFilter, strDstDir, fRecursive, fFollowSymlinks,
-                                             strSrcSubDir + strName);
-                break;
-            }
-
-            case FsObjType_Symlink:
-            {
-                if (fFollowSymlinks)
-                { /* Fall through to next case is intentional. */ }
-                else
-                    break;
-                RT_FALL_THRU();
-            }
-
-            case FsObjType_File:
-            {
-                if (   strFilter.isNotEmpty()
-                    && !RTStrSimplePatternMatch(strFilter.c_str(), strName.c_str()))
-                {
-                    break; /* Filter does not match. */
-                }
-
-                if (RT_SUCCESS(rc))
-                {
-                    Utf8Str strSrcFile = strSrcDir + strSrcSubDir + strName;
-                    Utf8Str strDstFile = strDstDir + strSrcSubDir + strName;
-                    rc = fileCopyFromGuest(strSrcFile, strDstFile, FileCopyFlag_None);
-                }
-                break;
-            }
-
-            default:
-                break;
-        }
-
-        BOOL fCanceled = FALSE;
-        if (   SUCCEEDED(mProgress->COMGETTER(Canceled(&fCanceled)))
-            && fCanceled)
-            break;
-    }
-
-    if (rc == VERR_NO_MORE_FILES) /* Reading done? */
-        rc = VINF_SUCCESS;
-
-    pDir->i_closeInternal(&rcGuest);
-
-    LogFlowFunc(("Leaving '%s', rc=%Rrc\n", strSrcCur.c_str(), rc));
-    return rc;
-}
-#endif
-
 HRESULT GuestSessionTaskCopyFrom::Init(const Utf8Str &strTaskDesc)
 {
@@ -2004,38 +1841,4 @@
     return rc;
 }
-
-#if 0
-SessionTaskCopyFileFrom::SessionTaskCopyFileFrom(GuestSession *pSession,
-                                                 const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags)
-                                                 : GuestSessionCopyTask(pSession)
-{
-    m_strTaskName = "gctlCpyFileFrm";
-
-    mSource = strSource;
-    mDest   = strDest;
-
-    Type.File.fCopyFlags = fFileCopyFlags;
-}
-
-SessionTaskCopyFileFrom::~SessionTaskCopyFileFrom(void)
-{
-
-}
-
-int SessionTaskCopyFileFrom::Run(void)
-{
-    LogFlowThisFuncEnter();
-
-    AutoCaller autoCaller(mSession);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    int rc = fileCopyFromGuest(mSource, mDest, Type.File.fCopyFlags);
-    if (RT_SUCCESS(rc))
-        rc = setProgressSuccess();
-
-    LogFlowFuncLeaveRC(rc);
-    return rc;
-}
-#endif
 
 GuestSessionTaskUpdateAdditions::GuestSessionTaskUpdateAdditions(GuestSession *pSession,
