- Timestamp:
- Jun 1, 2015 2:23:41 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp
r55805 r56184 55 55 int rc = RTPathQueryInfo(pcszSource, &objInfo, RTFSOBJATTRADD_NOTHING); 56 56 if (RT_SUCCESS(rc)) 57 { 57 { 58 58 if (RTFS_IS_FILE(objInfo.Attr.fMode)) 59 59 { 60 60 LogFlowFunc(("File '%s' -> '%s'\n", pcszSource, pcszTarget)); 61 61 62 m_lstTree.append(DnDURIObject(DnDURIObject::File, pcszSource, pcszTarget, 62 m_lstTree.append(DnDURIObject(DnDURIObject::File, pcszSource, pcszTarget, 63 63 objInfo.Attr.fMode, (uint64_t)objInfo.cbObject)); 64 64 m_cTotal++; … … 82 82 } 83 83 84 int DnDURIList::appendPathRecursive(const char *pcszSrcPath, 84 int DnDURIList::appendPathRecursive(const char *pcszSrcPath, 85 85 const char *pcszDstPath, const char *pcszDstBase, size_t cchDstBase, uint32_t fFlags) 86 86 { … … 88 88 AssertPtrReturn(pcszDstBase, VERR_INVALID_POINTER); 89 89 AssertPtrReturn(pcszDstPath, VERR_INVALID_POINTER); 90 91 LogFlowFunc(("pcszSrcPath=%s, pcszDstPath=%s, pcszDstBase=%s, cchDstBase=%zu\n", 90 91 LogFlowFunc(("pcszSrcPath=%s, pcszDstPath=%s, pcszDstBase=%s, cchDstBase=%zu\n", 92 92 pcszSrcPath, pcszDstPath, pcszDstBase, cchDstBase)); 93 93 … … 95 95 int rc = RTPathQueryInfo(pcszSrcPath, &objInfo, RTFSOBJATTRADD_NOTHING); 96 96 if (RT_SUCCESS(rc)) 97 { 97 { 98 98 if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode)) 99 99 { … … 104 104 rc = RTDirOpen(&hDir, pcszSrcPath); 105 105 if (RT_SUCCESS(rc)) 106 { 106 { 107 107 do 108 108 { … … 123 123 if ( RTStrCmp(DirEntry.szName, ".") == 0 124 124 || RTStrCmp(DirEntry.szName, "..") == 0) 125 break; 125 break; 126 126 127 127 char *pszSrc = RTPathJoinA(pcszSrcPath, DirEntry.szName); … … 176 176 { 177 177 LogFlowFunc(("Directory entry is symlink to directory\n")); 178 rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags); 178 rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags); 179 179 } 180 180 else if (RTFS_IS_FILE(objInfo.Attr.fMode)) … … 188 188 189 189 RTStrFree(pszSrc); 190 } 190 } 191 191 else 192 192 rc = VERR_NO_MEMORY; … … 221 221 { 222 222 LogFlowFunc(("Symlink to directory\n")); 223 rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags); 223 rc = appendPathRecursive(pszSrc, pcszDstPath, pcszDstBase, cchDstBase, fFlags); 224 224 } 225 225 else if (RTFS_IS_FILE(objInfo.Attr.fMode)) … … 233 233 234 234 RTStrFree(pszSrc); 235 } 235 } 236 236 else 237 rc = VERR_NO_MEMORY; 237 rc = VERR_NO_MEMORY; 238 238 } 239 239 } … … 468 468 RTStrFree(pszPathURI); 469 469 } 470 else 470 471 RTStrFree(pszPath); 472 473 if (!pszPathURI) 471 474 break; 472 RTStrFree(pszPath);473 475 } 474 476 else
Note:
See TracChangeset
for help on using the changeset viewer.