Index: /trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp	(revision 59850)
+++ /trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp	(revision 59851)
@@ -524,4 +524,8 @@
                                       "user does not have the appropriate access rights for. Please make sure that all selected "
                                       "elements can be accessed and that your host user has the appropriate rights."));
+            break;
+
+        case VERR_DISK_FULL:
+            strError += Utf8StrFmt(tr("Host disk ran out of space (disk is full)."));
             break;
 
@@ -719,4 +723,9 @@
         {
             pCtx->mURI.processObject(*pObj);
+
+            /* Add for having a proper rollback. */
+            int rc2 = pCtx->mURI.getDroppedFiles().AddDir(pszDir);
+            AssertRC(rc2);
+
             objCtx.reset();
             LogRel2(("DnD: Created guest directory on host: %s\n", pszDir));
@@ -830,4 +839,10 @@
                               RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE,
                               (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR);
+            if (RT_SUCCESS(rc))
+            {
+                /* Add for having a proper rollback. */
+                int rc2 = pCtx->mURI.getDroppedFiles().AddFile(pszPathAbs);
+                AssertRC(rc2);
+            }
         }
 
@@ -917,4 +932,6 @@
                 rc = updateProgress(&pCtx->mData, pCtx->mpResp, cbWritten);
         }
+        else /* Something went wrong; close the object. */
+            pObj->Close();
 
         if (RT_SUCCESS(rc))
@@ -1154,6 +1171,7 @@
         else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
         {
-            rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR,
-                                           rc, GuestDnDSource::i_hostErrorToString(rc));
+            int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR,
+                                                rc, GuestDnDSource::i_hostErrorToString(rc));
+            AssertRC(rc2);
         }
     }
@@ -1257,11 +1275,9 @@
 #undef UNREGISTER_CALLBACK
 
-    int rc2;
-
     if (RT_FAILURE(rc))
     {
         if (rc == VERR_CANCELLED)
         {
-            rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);
+            int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);
             AssertRC(rc2);
 
@@ -1271,6 +1287,7 @@
         else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */
         {
-            rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR,
-                                           rc, GuestDnDSource::i_hostErrorToString(rc));
+            int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR,
+                                                rc, GuestDnDSource::i_hostErrorToString(rc));
+            AssertRC(rc2);
         }
     }
@@ -1278,7 +1295,8 @@
     if (RT_FAILURE(rc))
     {
-        rc2 = droppedFiles.Rollback();
+        int rc2 = droppedFiles.Rollback();
         if (RT_FAILURE(rc2))
-            LogRel2(("DnD: Rollback failed with %Rrc\n", rc2));
+            LogRel(("DnD: Deleting left over temporary files failed (%Rrc). Please remove directory manually: %s\n",
+                    rc2, droppedFiles.GetDirAbs()));
     }
 
