Changeset 56900 in vbox
- Timestamp:
- Jul 9, 2015 2:24:26 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101578
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/DragAndDrop.h
r55805 r56900 41 41 * Structure for maintaining a "dropped files" directory 42 42 * on the host or guest. This will contain all received files & directories 43 * for a single transfer.43 * for a single drag and drop operation. 44 44 */ 45 45 typedef struct DNDDIRDROPPEDFILES … … 47 47 /** Directory handle for drop directory. */ 48 48 PRTDIR hDir; 49 /** Flag indicating whether the drop directory 50 * has been opened for processing or not. */ 51 bool fOpen; 49 52 /** Absolute path to drop directory. */ 50 53 RTCString strPathAbs; -
trunk/src/VBox/GuestHost/DragAndDrop/DnDDir.cpp
r55640 r56900 97 97 pDir->hDir = phDir; 98 98 pDir->strPathAbs = pszDropDir; 99 pDir->fOpen = true; 99 100 } 100 101 } … … 125 126 AssertPtrReturn(pDir, VERR_INVALID_POINTER); 126 127 127 int rc = RTDirClose(pDir->hDir); 128 int rc = VINF_SUCCESS; 129 if (pDir->fOpen) 130 { 131 rc = RTDirClose(pDir->hDir); 132 if (RT_SUCCESS(rc)) 133 pDir->fOpen = false; 134 } 128 135 if (RT_SUCCESS(rc)) 129 136 { … … 131 138 pDir->lstFiles.clear(); 132 139 133 if (fRemove) 140 if ( fRemove 141 && pDir->strPathAbs.isNotEmpty()) 134 142 { 135 143 /* Try removing the (empty) drop directory in any case. */
Note:
See TracChangeset
for help on using the changeset viewer.