Changeset 97152 in vbox for trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
- Timestamp:
- Oct 14, 2022 8:14:05 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 154125
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r97151 r97152 1210 1210 * Needed for recursion. 1211 1211 * @param cbPathReal Size (in bytes) of \a pszPathReal. 1212 * @param pDirEntry Where to store looked up directory information for handled paths. 1213 * Needed for recursion. 1212 1214 */ 1213 1215 int FsList::AddDirFromHost(const Utf8Str &strPath, const Utf8Str &strSubDir, 1214 char *pszPathReal, size_t cbPathReal )1216 char *pszPathReal, size_t cbPathReal, PRTDIRENTRYEX pDirEntry) 1215 1217 { 1216 1218 Utf8Str strPathAbs = strPath; … … 1249 1251 { 1250 1252 /* Retrieve the next directory entry. */ 1251 RTDIRENTRYEX Entry; 1252 vrc = RTDirReadEx(hDir, &Entry, NULL, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 1253 vrc = RTDirReadEx(hDir, pDirEntry, NULL, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 1253 1254 if (RT_FAILURE(vrc)) 1254 1255 { … … 1258 1259 } 1259 1260 1260 Utf8Str strEntry = strPathSub + Utf8Str( Entry.szName);1261 Utf8Str strEntry = strPathSub + Utf8Str(pDirEntry->szName); 1261 1262 1262 1263 LogFlowFunc(("Entry '%s'\n", strEntry.c_str())); 1263 1264 1264 switch ( Entry.Info.Attr.fMode & RTFS_TYPE_MASK)1265 switch (pDirEntry->Info.Attr.fMode & RTFS_TYPE_MASK) 1265 1266 { 1266 1267 case RTFS_TYPE_DIRECTORY: 1267 1268 { 1268 1269 /* Skip "." and ".." entries. */ 1269 if (RTDirEntryExIsStdDotLink( &Entry))1270 if (RTDirEntryExIsStdDotLink(pDirEntry)) 1270 1271 break; 1271 1272 … … 1275 1276 break; 1276 1277 1277 vrc = AddDirFromHost(strPath, strEntry, pszPathReal, cbPathReal );1278 vrc = AddDirFromHost(strPath, strEntry, pszPathReal, cbPathReal, pDirEntry); 1278 1279 break; 1279 1280 } … … 1283 1284 LogRel2(("Guest Control: File '%s'\n", strEntry.c_str())); 1284 1285 1285 vrc = AddEntryFromHost(strEntry, & Entry.Info);1286 vrc = AddEntryFromHost(strEntry, &pDirEntry->Info); 1286 1287 break; 1287 1288 } … … 1291 1292 if (mSourceSpec.Type.Dir.fCopyFlags & DirectoryCopyFlag_FollowLinks) 1292 1293 { 1293 Utf8Str strEntryAbs = strPathAbs + (const char *) Entry.szName;1294 Utf8Str strEntryAbs = strPathAbs + (const char *)pDirEntry->szName; 1294 1295 1295 1296 vrc = RTPathReal(strEntryAbs.c_str(), pszPathReal, cbPathReal); … … 1303 1304 LogRel2(("Guest Control: Symbolic link '%s' -> '%s' (directory)\n", 1304 1305 strEntryAbs.c_str(), pszPathReal)); 1305 vrc = AddDirFromHost(strPath, strEntry, pszPathReal, cbPathReal );1306 vrc = AddDirFromHost(strPath, strEntry, pszPathReal, cbPathReal, pDirEntry); 1306 1307 } 1307 1308 else if (RTFS_IS_FILE(objInfo.Attr.fMode)) … … 1809 1810 { 1810 1811 char szPathReal[RTPATH_MAX]; 1811 vrc = pFsList->AddDirFromHost(strSrc /* strPath */, "" /* strSubDir */, szPathReal, sizeof(szPathReal)); 1812 RTDIRENTRYEX DirEntry; 1813 vrc = pFsList->AddDirFromHost(strSrc /* strPath */, "" /* strSubDir */, 1814 szPathReal, sizeof(szPathReal), &DirEntry); 1812 1815 } 1813 1816 else
Note:
See TracChangeset
for help on using the changeset viewer.