Changeset 108317 in vbox
- Timestamp:
- Feb 20, 2025 5:14:58 PM (3 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167661
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
r106061 r108317 1285 1285 { 1286 1286 /** @todo r=bird: RTDIRENTRY is big and this function is doing 1287 * unrestrained recursion of arbritrary depth. Fourthings:1287 * unrestrained recursion of arbritrary depth. Three things: 1288 1288 * - Add a depth counter parameter and refuse to go deeper than 1289 1289 * a certain reasonable limit. … … 1295 1295 * entry with a name longer than RTDIRENTRY have space to 1296 1296 * store (windows host with UTF-16 encoding shorter than 255 1297 * chars, but UTF-8 encoding longer than 260). 1298 * - enmType can be RTDIRENTRYTYPE_UNKNOWN if the file system or 1299 * the host doesn't return the information. See 1300 * RTDIRENTRY::enmType. Use RTDirQueryUnknownType() to get the 1301 * actual type. */ 1297 * chars, but UTF-8 encoding longer than 260). */ 1302 1298 RTDIRENTRY DirEntry; 1303 1299 while (RT_SUCCESS(RTDirRead(hDir, &DirEntry, NULL))) … … 1305 1301 if (RTDirEntryIsStdDotLink(&DirEntry)) 1306 1302 continue; 1303 1304 /* Make sure we've got the entry type. */ 1305 if (DirEntry.enmType == RTDIRENTRYTYPE_UNKNOWN) 1306 { 1307 /* Build the complete path which is needed by RTDirQueryUnknownType(). */ 1308 char szPath[RTPATH_MAX]; 1309 vrc = RTPathJoin(szPath, sizeof(szPath), strRootFolder.c_str(), DirEntry.szName); 1310 if (RT_SUCCESS(vrc)) 1311 vrc = RTDirQueryUnknownType(szPath, false /*fFollowSymlinks*/, &DirEntry.enmType); 1312 if (RT_FAILURE(vrc)) 1313 continue; 1314 } 1307 1315 1308 1316 if (DirEntry.enmType == RTDIRENTRYTYPE_FILE)
Note:
See TracChangeset
for help on using the changeset viewer.