- Timestamp:
- Oct 25, 2010 2:10:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImplImport.cpp
r33369 r33424 2430 2430 } 2431 2431 2432 /* Get all hard disk descriptions. */ 2433 std::list<VirtualSystemDescriptionEntry*> avsdeHDs = vsdescThis->findByType(VirtualSystemDescriptionType_HardDiskImage); 2434 2432 2435 // for each medium attachment to this controller... 2433 2436 for (settings::AttachedDevicesList::iterator dit = sc.llAttachedDevices.begin(); … … 2443 2446 // convert the Guid to string 2444 2447 Utf8Str strUuid = d.uuid.toString(); 2448 2445 2449 2446 2450 // there must be an image in the OVF disk structs with the same UUID … … 2454 2458 if (di.uuidVbox == strUuid) 2455 2459 { 2456 Utf8Str strTargetPath(stack.strMachineFolder); 2457 strTargetPath.append(RTPATH_DELIMITER); 2458 strTargetPath.append(di.strHref); 2459 searchUniqueDiskImageFilePath(strTargetPath); 2460 VirtualSystemDescriptionEntry *vsdeTargetHD = 0; 2461 2462 /* Iterate over all given disk images of the virtual system 2463 * disks description. We need to find the target disk path, 2464 * which could be changed by the user. */ 2465 list<VirtualSystemDescriptionEntry*>::const_iterator itHD; 2466 for (itHD = avsdeHDs.begin(); 2467 itHD != avsdeHDs.end(); 2468 ++itHD) 2469 { 2470 VirtualSystemDescriptionEntry *vsdeHD = *itHD; 2471 if (vsdeHD->strRef == oit->first) 2472 { 2473 vsdeTargetHD = vsdeHD; 2474 break; 2475 } 2476 } 2477 if (!vsdeTargetHD) 2478 throw setError(E_FAIL, 2479 tr("Internal inconsistency looking up disk image '%s'"), 2480 oit->first.c_str()); 2460 2481 2461 2482 /* … … 2466 2487 ComObjPtr<Medium> pTargetHD; 2467 2488 importOneDiskImage(di, 2468 strTargetPath,2489 vsdeTargetHD->strVboxCurrent, 2469 2490 pTargetHD, 2470 2491 stack,
Note:
See TracChangeset
for help on using the changeset viewer.