Index: trunk/src/VBox/Main/include/GuestSessionImplTasks.h
===================================================================
--- trunk/src/VBox/Main/include/GuestSessionImplTasks.h	(revision 72023)
+++ trunk/src/VBox/Main/include/GuestSessionImplTasks.h	(revision 72045)
@@ -173,7 +173,7 @@
     }
 
-    const ComObjPtr<Progress>& GetProgressObject() const { return mProgress; }
-
-    const ComObjPtr<GuestSession>& GetSession() const { return mSession; }
+    const ComObjPtr<Progress>& GetProgressObject(void) const { return mProgress; }
+
+    const ComObjPtr<GuestSession>& GetSession(void) const { return mSession; }
 
 protected:
Index: trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 72023)
+++ trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 72045)
@@ -812,14 +812,14 @@
 
     }
-    catch(std::bad_alloc &)
+    catch (std::bad_alloc &)
     {
         hrc = E_OUTOFMEMORY;
     }
-    catch(HRESULT eHR)
+    catch (HRESULT eHR)
     {
         hrc = eHR;
-        LogFlowThisFunc(("Exception was caught in the function\n"));
-    }
-
+    }
+
+    LogFlowFunc(("Returning %Rhrc\n", hrc));
     return hrc;
 }
@@ -913,14 +913,14 @@
 
     }
-    catch(std::bad_alloc &)
+    catch (std::bad_alloc &)
     {
         hrc = E_OUTOFMEMORY;
     }
-    catch(HRESULT eHR)
+    catch (HRESULT eHR)
     {
         hrc = eHR;
-        LogFlowThisFunc(("Exception was caught in the function\n"));
-    }
-
+    }
+
+    LogFlowFunc(("Returning %Rhrc\n", hrc));
     return hrc;
 }
Index: trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 72023)
+++ trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 72045)
@@ -124,5 +124,4 @@
 }
 
-
 int GuestSessionTask::getGuestProperty(const ComObjPtr<Guest> &pGuest,
                                        const Utf8Str &strPath, Utf8Str &strValue)
@@ -213,5 +212,5 @@
  * Creates a directory on the guest.
  *
- * @return VBox status code. VWRN_ALREADY_EXISTS if directory on the guest already exists.
+ * @return VBox status code. VERR_ALREADY_EXISTS if directory on the guest already exists.
  * @param  strPath                  Absolute path to directory on the guest (guest style path) to create.
  * @param  enmDirectoryCreateFlags  Directory creation flags.
@@ -229,5 +228,5 @@
     if (RT_SUCCESS(rc))
     {
-        return VWRN_ALREADY_EXISTS;
+        return VERR_ALREADY_EXISTS;
     }
     else
@@ -747,5 +746,5 @@
                 if (   !strDest.endsWith("\\")
                     && !strDest.endsWith("/"))
-                    RTStrCat(szDstPath, sizeof(szDstPath), mPathStyle.c_str());
+                    RTStrCat(szDstPath, sizeof(szDstPath), "/");
 
                 RTStrCat(szDstPath, sizeof(szDstPath), RTPathFilename(strSource.c_str()));
@@ -985,5 +984,5 @@
         if (   !mSrcRootAbs.endsWith("/")
             && !mSrcRootAbs.endsWith("\\"))
-            mSrcRootAbs += mSourceSpec.enmPathStyle == PathStyle_DOS ? "\\" : "/";
+            mSrcRootAbs += "/";
 
         if (   !mDstRootAbs.endsWith("/")
@@ -1029,5 +1028,5 @@
     if (   !strPathAbs.endsWith("/")
         && !strPathAbs.endsWith("\\"))
-        strPathAbs += mSourceSpec.enmPathStyle == PathStyle_DOS ? "\\" : "/";
+        strPathAbs += "/";
 
     Utf8Str strPathSub = strSubDir;
@@ -1035,5 +1034,5 @@
         && !strPathSub.endsWith("/")
         && !strPathSub.endsWith("\\"))
-        strPathSub += mSourceSpec.enmPathStyle == PathStyle_DOS ? "\\" : "/";
+        strPathSub += "/";
 
     strPathAbs += strPathSub;
@@ -1129,4 +1128,7 @@
             }
         }
+
+        if (rc == VERR_NO_MORE_FILES) /* End of listing reached? */
+            rc = VINF_SUCCESS;
     }
 
@@ -1359,4 +1361,12 @@
 
     ULONG cOperations = 0;
+    Utf8Str strErrorInfo;
+
+    /**
+     * Note: We need to build up the file/directory here instead of GuestSessionTaskCopyFrom::Run
+     *       because the caller expects a ready-for-operation progress object on return.
+     *       The progress object will have a variable operation count, based on the elements to
+     *       be processed.
+     */
 
     GuestSessionFsSourceSet::iterator itSrc = mSources.begin();
@@ -1375,9 +1385,11 @@
                 if (   !strDst.endsWith("/")
                     && !strDst.endsWith("\\"))
-                    strDst += mPathStyle;
+                    strDst += "/";
 
                 strDst += Utf8StrFmt("%s", RTPathFilenameEx(strSrc.c_str(), mfPathStyle));
             }
         }
+
+        LogFlowFunc(("strSrc=%s, strDst=%s\n", strSrc.c_str(), strDst.c_str()));
 
         GuestFsObjData srcObjData; int rcGuest;
@@ -1386,4 +1398,5 @@
         if (RT_FAILURE(rc))
         {
+            strErrorInfo = Utf8StrFmt(GuestSession::tr("No such source file/directory: %s"), strSrc.c_str());
             break;
         }
@@ -1393,4 +1406,5 @@
             if (itSrc->enmType != FsObjType_Directory)
             {
+                strErrorInfo = Utf8StrFmt(GuestSession::tr("Source is not a file: %s"), strSrc.c_str());
                 rc = VERR_NOT_A_FILE;
                 break;
@@ -1401,68 +1415,9 @@
             if (itSrc->enmType != FsObjType_File)
             {
+                strErrorInfo = Utf8StrFmt(GuestSession::tr("Source is not a directory: %s"), strSrc.c_str());
                 rc = VERR_NOT_A_DIRECTORY;
                 break;
             }
         }
-
-        LogFlowFunc(("strSrc=%s, strDst=%s\n", strSrc.c_str(), strDst.c_str()));
-
-#if 0
-        if (itSrc->enmType == FsObjType_Directory)
-        {
-            bool fDstExists = RTDirExists(strDstDir.c_str());
-            if (fDstExists)
-            {
-                if (!(itSrc->Type.Dir.fCopyFlags & DirectoryCopyFlag_CopyIntoExisting))
-                {
-                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        Utf8StrFmt(GuestSession::tr("Destination directory \"%s\" exists when it must not"), mDest.c_str()));
-                    rc = VERR_ALREADY_EXISTS;
-                    break;
-                }
-            }
-
-            if (   !strSrcDir.endsWith("/")
-                && !strSrcDir.endsWith("\\"))
-            {
-                if (   !strDstDir.endsWith("/")
-                    && !strDstDir.endsWith("\\"))
-                        strDstDir += "/"; /* IPRT can handle / on all hosts. */
-
-                strDstDir += Utf8StrFmt("%s", RTPathFilenameEx(strSrcDir.c_str(), mfPathStyle));
-            }
-
-            /* Create the final target directory on the host.
-             * The target directory might already exist on the host (which can be controlled by the copy flags). */
-            fDstExists = RTDirExists(strDstDir.c_str());
-            if (fDstExists)
-            {
-                if (!(itSrc->Type.Dir.fCopyFlags & DirectoryCopyFlag_CopyIntoExisting))
-                {
-                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        Utf8StrFmt(GuestSession::tr("Destination directory \"%s\" exists when it must not"), strDstDir.c_str()));
-                    rc = VERR_ALREADY_EXISTS;
-                    break;
-                }
-            }
-            else
-            {
-                rc = RTDirCreate(strDstDir.c_str(), fDirMode, 0);
-                if (RT_FAILURE(rc))
-                {
-                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        Utf8StrFmt(GuestSession::tr("Error creating destination directory \"%s\", rc=%Rrc"),
-                                                   strDstDir.c_str(), rc));
-                    break;
-                }
-            }
-        }
-        else if (itSrc->enmType == FsObjType_File)
-        {
-
-        }
-        else
-            AssertFailed();
-#endif
 
         FsList *pFsList = NULL;
@@ -1484,4 +1439,5 @@
             {
                 delete pFsList;
+                strErrorInfo = Utf8StrFmt(GuestSession::tr("Error adding source '%s' to list: %Rrc"), strSrc.c_str(), rc);
                 break;
             }
@@ -1501,20 +1457,25 @@
     }
 
-    if (RT_SUCCESS(rc))
-    {
-        Utf8Str strFirstOp;
-        if (cOperations) /* Use the first element as description (if available). */
-        {
-            Assert(mVecLists.size());
-            Assert(mVecLists[0]->mVecEntries.size());
-
-            strFirstOp = mDest + mVecLists[0]->mVecEntries[0]->strPath;
-        }
-
+    if (cOperations) /* Use the first element as description (if available). */
+    {
+        Assert(mVecLists.size());
+        Assert(mVecLists[0]->mVecEntries.size());
+
+        Utf8Str strFirstOp = mDest + mVecLists[0]->mVecEntries[0]->strPath;
         hr = pProgress->init(static_cast<IGuestSession*>(mSession), Bstr(mDesc).raw(),
                              TRUE /* aCancelable */, cOperations + 1 /* Number of operations */,
                              Bstr(strFirstOp).raw());
     }
-
+    else /* If no operations have been defined, go with an "empty" progress object when will be used for error handling. */
+        hr = pProgress->init(static_cast<IGuestSession*>(mSession), Bstr(mDesc).raw(),
+                             TRUE /* aCancelable */, 1 /* cOperations */, Bstr(mDesc).raw());
+
+    if (RT_FAILURE(rc))
+    {
+        Assert(strErrorInfo.isNotEmpty());
+        setProgressErrorMsg(VBOX_E_IPRT_ERROR, strErrorInfo);
+    }
+
+    LogFlowFunc(("Returning %Rhrc (%Rrc)\n", hr, rc));
     return rc;
 }
@@ -1563,11 +1524,13 @@
                 strSrcAbs += pEntry->strPath;
                 strDstAbs += pEntry->strPath;
-            }
-
-            LogFlowFunc(("Entry '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str()));
+
+                if (pList->mSourceSpec.enmPathStyle == PathStyle_DOS)
+                    strDstAbs.findReplace('\\', '/');
+            }
 
             switch (pEntry->fMode & RTFS_TYPE_MASK)
             {
                 case RTFS_TYPE_DIRECTORY:
+                    LogFlowFunc(("Directory '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str()));
                     if (!pList->mSourceSpec.fDryRun)
                     {
@@ -1577,4 +1540,7 @@
                             if (!fCopyIntoExisting)
                             {
+                                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
+                                                    Utf8StrFmt(GuestSession::tr("Destination directory \"%s\" already exists"),
+                                                               strDstAbs.c_str()));
                                 break;
                             }
@@ -1589,4 +1555,5 @@
 
                 case RTFS_TYPE_FILE:
+                    LogFlowFunc(("File '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str()));
                     if (!pList->mSourceSpec.fDryRun)
                         rc = fileCopyFromGuest(strSrcAbs, strDstAbs, FileCopyFlag_None);
@@ -1650,4 +1617,12 @@
 
     ULONG cOperations = 0;
+    Utf8Str strErrorInfo;
+
+    /**
+     * Note: We need to build up the file/directory here instead of GuestSessionTaskCopyTo::Run
+     *       because the caller expects a ready-for-operation progress object on return.
+     *       The progress object will have a variable operation count, based on the elements to
+     *       be processed.
+     */
 
     GuestSessionFsSourceSet::iterator itSrc = mSources.begin();
@@ -1666,14 +1641,19 @@
                 if (   !strDst.endsWith("/")
                     && !strDst.endsWith("\\"))
-                    strDst += mPathStyle;
+                    strDst += "/";
 
                 strDst += Utf8StrFmt("%s", RTPathFilenameEx(strSrc.c_str(), mfPathStyle));
             }
         }
+
+        LogFlowFunc(("strSrc=%s, strDst=%s\n", strSrc.c_str(), strDst.c_str()));
 
         RTFSOBJINFO srcFsObjInfo;
         rc = RTPathQueryInfo(strSrc.c_str(), &srcFsObjInfo, RTFSOBJATTRADD_NOTHING);
         if (RT_FAILURE(rc))
+        {
+            strErrorInfo = Utf8StrFmt(GuestSession::tr("No such source file/directory: %s"), strSrc.c_str());
             break;
+        }
 
         if (RTFS_IS_DIRECTORY(srcFsObjInfo.Attr.fMode))
@@ -1681,4 +1661,5 @@
             if (itSrc->enmType != FsObjType_Directory)
             {
+                strErrorInfo = Utf8StrFmt(GuestSession::tr("Source is not a file: %s"), strSrc.c_str());
                 rc = VERR_NOT_A_FILE;
                 break;
@@ -1689,10 +1670,9 @@
             if (itSrc->enmType == FsObjType_Directory)
             {
+                strErrorInfo = Utf8StrFmt(GuestSession::tr("Source is not a directory: %s"), strSrc.c_str());
                 rc = VERR_NOT_A_DIRECTORY;
                 break;
             }
         }
-
-        LogFlowFunc(("strSrc=%s, strDst=%s\n", strSrc.c_str(), strDst.c_str()));
 
         FsList *pFsList = NULL;
@@ -1712,5 +1692,9 @@
 
             if (RT_FAILURE(rc))
-                break;
+            {
+                delete pFsList;
+                strErrorInfo = Utf8StrFmt(GuestSession::tr("Error adding source '%s' to list: %Rrc"), strSrc.c_str(), rc);
+                break;
+            }
 
             mVecLists.push_back(pFsList);
@@ -1728,14 +1712,10 @@
     }
 
-    if (RT_SUCCESS(rc))
-    {
-        Utf8Str strFirstOp;
-        if (cOperations) /* Use the first element as description (if available). */
-        {
-            Assert(mVecLists.size());
-            Assert(mVecLists[0]->mVecEntries.size());
-
-            strFirstOp = mDest + mVecLists[0]->mVecEntries[0]->strPath;
-        }
+    if (cOperations) /* Use the first element as description (if available). */
+    {
+        Assert(mVecLists.size());
+        Assert(mVecLists[0]->mVecEntries.size());
+
+        Utf8Str strFirstOp = mDest + mVecLists[0]->mVecEntries[0]->strPath;
 
         hr = pProgress->init(static_cast<IGuestSession*>(mSession), Bstr(mDesc).raw(),
@@ -1743,6 +1723,15 @@
                              Bstr(strFirstOp).raw());
     }
-
-    LogFlowFunc(("rc=%Rrc\n", rc));
+    else /* If no operations have been defined, go with an "empty" progress object when will be used for error handling. */
+        hr = pProgress->init(static_cast<IGuestSession*>(mSession), Bstr(mDesc).raw(),
+                             TRUE /* aCancelable */, 1 /* cOperations */, Bstr(mDesc).raw());
+
+    if (RT_FAILURE(rc))
+    {
+        Assert(strErrorInfo.isNotEmpty());
+        setProgressErrorMsg(VBOX_E_IPRT_ERROR, strErrorInfo);
+    }
+
+    LogFlowFunc(("Returning %Rhrc (%Rrc)\n", hr, rc));
     return hr;
 }
@@ -1794,15 +1783,17 @@
             }
 
-            LogFlowFunc(("Entry '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str()));
-
             switch (pEntry->fMode & RTFS_TYPE_MASK)
             {
                 case RTFS_TYPE_DIRECTORY:
+                    LogFlowFunc(("Directory '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str()));
                     if (!pList->mSourceSpec.fDryRun)
                     {
                         rc = directoryCreate(strDstAbs.c_str(), DirectoryCreateFlag_None, fDirMode, fFollowSymlinks);
-                        if (   rc == VWRN_ALREADY_EXISTS
+                        if (   rc == VERR_ALREADY_EXISTS
                             && !fCopyIntoExisting)
                         {
+                            setProgressErrorMsg(VBOX_E_IPRT_ERROR,
+                                                Utf8StrFmt(GuestSession::tr("Destination directory \"%s\" already exists"),
+                                                           strDstAbs.c_str()));
                             break;
                         }
@@ -1811,4 +1802,5 @@
 
                 case RTFS_TYPE_FILE:
+                    LogFlowFunc(("File '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str()));
                     if (!pList->mSourceSpec.fDryRun)
                         rc = fileCopyToGuest(strSrcAbs, strDstAbs, FileCopyFlag_None);
