- Timestamp:
- Jul 9, 2015 3:43:22 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/DragAndDrop.h
r56900 r56903 77 77 /** Resolve all symlinks. */ 78 78 #define DNDURILIST_FLAGS_RESOLVE_SYMLINKS RT_BIT(1) 79 /** Keep the files + directory entries open while 80 * being in this list. */ 81 #define DNDURILIST_FLAGS_KEEP_OPEN RT_BIT(2) 82 /** Lazy loading: Only enumerate sub directories when needed. 83 ** @todo Implement lazy loading. */ 84 #define DNDURILIST_FLAGS_LAZY RT_BIT(3) 79 85 80 86 class DnDURIObject -
trunk/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
r56899 r56903 50 50 AssertPtrReturn(pcszTarget, VERR_INVALID_POINTER); 51 51 52 LogFlowFunc(("pcszSource=%s, pcszTarget=%s \n", pcszSource, pcszTarget));52 LogFlowFunc(("pcszSource=%s, pcszTarget=%s, fFlags=0x%x\n", pcszSource, pcszTarget, fFlags)); 53 53 54 54 RTFSOBJINFO objInfo; … … 60 60 LogFlowFunc(("File '%s' -> '%s' (%RU64)\n", pcszSource, pcszTarget, (uint64_t)objInfo.cbObject)); 61 61 62 m_lstTree.append(DnDURIObject(DnDURIObject::File, pcszSource, pcszTarget, 63 objInfo.Attr.fMode, (uint64_t)objInfo.cbObject)); 64 m_cTotal++; 65 m_cbTotal += (uint64_t)objInfo.cbObject; 62 DnDURIObject objFile(DnDURIObject::File, pcszSource, pcszTarget); 63 if (fFlags & DNDURILIST_FLAGS_KEEP_OPEN) /* Shall we keep the file open while being added to this list? */ 64 { 65 /** @todo Add a standard fOpen mode for this list. */ 66 rc = objFile.Open(DnDURIObject::Source, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE, objInfo.Attr.fMode); 67 } 68 69 if (RT_SUCCESS(rc)) 70 { 71 m_lstTree.append(objFile); 72 73 m_cTotal++; 74 m_cbTotal += (uint64_t)objInfo.cbObject; 75 } 66 76 } 67 77 else if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode)) … … 71 81 m_lstTree.append(DnDURIObject(DnDURIObject::Directory, pcszSource, pcszTarget, 72 82 objInfo.Attr.fMode, 0 /* Size */)); 83 84 /** @todo Add DNDURILIST_FLAGS_KEEP_OPEN handling. */ 85 73 86 m_cTotal++; 74 87 } … … 395 408 return; 396 409 397 DnDURIObject &cur Path= m_lstTree.first();398 399 uint64_t cbSize = cur Path.GetSize();410 DnDURIObject &curObj = m_lstTree.first(); 411 412 uint64_t cbSize = curObj.GetSize(); 400 413 Assert(m_cbTotal >= cbSize); 401 414 m_cbTotal -= cbSize; /* Adjust total size. */ 415 416 curObj.Close(); 402 417 403 418 m_lstTree.removeFirst();
Note:
See TracChangeset
for help on using the changeset viewer.