Changeset 57500 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Aug 21, 2015 4:54:50 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102287
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp
r57372 r57500 414 414 if (pszPathAbs) 415 415 { 416 rc = RTDirCreate(pszPathAbs, (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRWXU, 0); 416 #ifdef RT_OS_WINDOWS 417 uint32_t fCreationMode = (fMode & RTFS_DOS_MASK) | RTFS_DOS_NT_NORMAL; 418 #else 419 uint32_t fCreationMode = (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRWXU; 420 #endif 421 rc = RTDirCreate(pszPathAbs, fCreationMode, 0); 417 422 if (RT_SUCCESS(rc)) 418 423 rc = DnDDirDroppedAddDir(&dirDroppedFiles, pszPathAbs); … … 455 460 if ( RT_SUCCESS(rc) 456 461 && ( uNextMsg == DragAndDropSvc::HOST_DND_HG_SND_FILE_HDR 457 /* Protocol v1 always sends the file name, so try openingevery time. */462 /* Protocol v1 always sends the file name, so opening the file every time. */ 458 463 || pCtx->uProtocol <= 1) 459 464 ) … … 465 470 szPathName, cbPathName, fMode, cbFileSize)); 466 471 467 uint64_t fOpen = RTFILE_O_WRITE | RTFILE_O_DENY_ ALL;472 uint64_t fOpen = RTFILE_O_WRITE | RTFILE_O_DENY_WRITE; 468 473 if (pCtx->uProtocol <= 1) 469 474 fOpen |= RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND; … … 475 480 { 476 481 RTCString strPathAbs(pszPathAbs); 477 rc = objFile.OpenEx(strPathAbs, DnDURIObject::File, DnDURIObject::Target, fOpen, 478 (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR); 482 #ifdef RT_OS_WINDOWS 483 uint32_t fCreationMode = (fMode & RTFS_DOS_MASK) | RTFS_DOS_NT_NORMAL; 484 #else 485 uint32_t fCreationMode = (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR; 486 #endif 487 rc = objFile.OpenEx(strPathAbs, DnDURIObject::File, DnDURIObject::Target, fOpen, fCreationMode); 479 488 if (RT_SUCCESS(rc)) 480 489 { … … 927 936 rc = VINF_PERMISSION_DENIED; 928 937 929 /* Set the protocol version to use. */ 930 pCtx->uProtocol = 2; 931 932 Assert(Info.u32ClientID); 933 pCtx->uClientID = Info.u32ClientID; 938 if (RT_SUCCESS(rc)) 939 { 940 /* Set the protocol version to use. */ 941 pCtx->uProtocol = 2; 942 943 Assert(Info.u32ClientID); 944 pCtx->uClientID = Info.u32ClientID; 945 } 934 946 } 935 947 … … 941 953 * does not implement this command. 942 954 */ 943 DragAndDropSvc::VBOXDNDCONNECT PMSG Msg;955 DragAndDropSvc::VBOXDNDCONNECTMSG Msg; 944 956 RT_ZERO(Msg); 945 957 Msg.hdr.result = VERR_WRONG_ORDER; … … 1142 1154 { 1143 1155 AssertPtrReturn(pCtx, VERR_INVALID_POINTER); 1156 AssertReturn(uStatus > DragAndDropSvc::DND_PROGRESS_UNKNOWN, VERR_INVALID_PARAMETER); 1144 1157 1145 1158 DragAndDropSvc::VBOXDNDHGEVTPROGRESSMSG Msg; … … 1147 1160 Msg.hdr.result = VERR_WRONG_ORDER; 1148 1161 Msg.hdr.u32ClientID = pCtx->uClientID; 1149 Msg.hdr.u32Function = DragAndDropSvc::GUEST_DND_HG_EVT_PROGRESS;1162 Msg.hdr.u32Function = uStatus; 1150 1163 Msg.hdr.cParms = 3; 1151 1164
Note:
See TracChangeset
for help on using the changeset viewer.