- Timestamp:
- Feb 26, 2016 3:35:35 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
r59842 r59851 524 524 "user does not have the appropriate access rights for. Please make sure that all selected " 525 525 "elements can be accessed and that your host user has the appropriate rights.")); 526 break; 527 528 case VERR_DISK_FULL: 529 strError += Utf8StrFmt(tr("Host disk ran out of space (disk is full).")); 526 530 break; 527 531 … … 719 723 { 720 724 pCtx->mURI.processObject(*pObj); 725 726 /* Add for having a proper rollback. */ 727 int rc2 = pCtx->mURI.getDroppedFiles().AddDir(pszDir); 728 AssertRC(rc2); 729 721 730 objCtx.reset(); 722 731 LogRel2(("DnD: Created guest directory on host: %s\n", pszDir)); … … 830 839 RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE, 831 840 (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR); 841 if (RT_SUCCESS(rc)) 842 { 843 /* Add for having a proper rollback. */ 844 int rc2 = pCtx->mURI.getDroppedFiles().AddFile(pszPathAbs); 845 AssertRC(rc2); 846 } 832 847 } 833 848 … … 917 932 rc = updateProgress(&pCtx->mData, pCtx->mpResp, cbWritten); 918 933 } 934 else /* Something went wrong; close the object. */ 935 pObj->Close(); 919 936 920 937 if (RT_SUCCESS(rc)) … … 1154 1171 else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */ 1155 1172 { 1156 rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, 1157 rc, GuestDnDSource::i_hostErrorToString(rc)); 1173 int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, 1174 rc, GuestDnDSource::i_hostErrorToString(rc)); 1175 AssertRC(rc2); 1158 1176 } 1159 1177 } … … 1257 1275 #undef UNREGISTER_CALLBACK 1258 1276 1259 int rc2;1260 1261 1277 if (RT_FAILURE(rc)) 1262 1278 { 1263 1279 if (rc == VERR_CANCELLED) 1264 1280 { 1265 rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED);1281 int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_CANCELLED); 1266 1282 AssertRC(rc2); 1267 1283 … … 1271 1287 else if (rc != VERR_GSTDND_GUEST_ERROR) /* Guest-side error are already handled in the callback. */ 1272 1288 { 1273 rc = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, 1274 rc, GuestDnDSource::i_hostErrorToString(rc)); 1289 int rc2 = pCtx->mpResp->setProgress(100, DND_PROGRESS_ERROR, 1290 rc, GuestDnDSource::i_hostErrorToString(rc)); 1291 AssertRC(rc2); 1275 1292 } 1276 1293 } … … 1278 1295 if (RT_FAILURE(rc)) 1279 1296 { 1280 rc2 = droppedFiles.Rollback();1297 int rc2 = droppedFiles.Rollback(); 1281 1298 if (RT_FAILURE(rc2)) 1282 LogRel2(("DnD: Rollback failed with %Rrc\n", rc2)); 1299 LogRel(("DnD: Deleting left over temporary files failed (%Rrc). Please remove directory manually: %s\n", 1300 rc2, droppedFiles.GetDirAbs())); 1283 1301 } 1284 1302
Note:
See TracChangeset
for help on using the changeset viewer.