Changeset 36653 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 12, 2011 12:27:10 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71125
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r36243 r36653 5 5 6 6 /* 7 * Copyright (C) 2008-201 0Oracle Corporation7 * Copyright (C) 2008-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 6188 6188 { 6189 6189 /* ensure the directory exists */ 6190 rc = VirtualBox::ensureFilePathExists(location); 6191 if (FAILED(rc)) 6192 throw rc; 6190 if (capabilities & VD_CAP_FILE) 6191 { 6192 rc = VirtualBox::ensureFilePathExists(location); 6193 if (FAILED(rc)) 6194 throw rc; 6195 } 6193 6196 6194 6197 VDGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */ … … 6352 6355 6353 6356 /* ensure the target directory exists */ 6354 rc = VirtualBox::ensureFilePathExists(targetLocation); 6355 if (FAILED(rc)) 6356 throw rc; 6357 if (capabilities & VD_CAP_FILE) 6358 { 6359 rc = VirtualBox::ensureFilePathExists(targetLocation); 6360 if (FAILED(rc)) 6361 throw rc; 6362 } 6357 6363 6358 6364 vrc = VDCreateDiff(hdd, … … 6833 6839 Utf8Str targetFormat(pTarget->m->strFormat); 6834 6840 Utf8Str targetLocation(pTarget->m->strLocationFull); 6841 uint64_t capabilities = pTarget->m->formatObj->getCapabilities(); 6835 6842 6836 6843 Assert( pTarget->m->state == MediumState_Creating … … 6844 6851 6845 6852 /* ensure the target directory exists */ 6846 rc = VirtualBox::ensureFilePathExists(targetLocation); 6847 if (FAILED(rc)) 6848 throw rc; 6853 if (capabilities & VD_CAP_FILE) 6854 { 6855 rc = VirtualBox::ensureFilePathExists(targetLocation); 6856 if (FAILED(rc)) 6857 throw rc; 6858 } 6849 6859 6850 6860 PVBOXHDD targetHdd; … … 7472 7482 Utf8Str targetFormat(task.mFormat->getId()); 7473 7483 Utf8Str targetLocation(task.mFilename); 7484 uint64_t capabilities = task.mFormat->getCapabilities(); 7474 7485 7475 7486 Assert(m->state == MediumState_LockedRead); … … 7479 7490 7480 7491 /* ensure the target directory exists */ 7481 rc = VirtualBox::ensureFilePathExists(targetLocation); 7482 if (FAILED(rc)) 7483 throw rc; 7492 if (capabilities & VD_CAP_FILE) 7493 { 7494 rc = VirtualBox::ensureFilePathExists(targetLocation); 7495 if (FAILED(rc)) 7496 throw rc; 7497 } 7484 7498 7485 7499 PVBOXHDD targetHdd; … … 7590 7604 Utf8Str targetFormat(m->strFormat); 7591 7605 Utf8Str targetLocation(m->strLocationFull); 7606 uint64_t capabilities = task.mFormat->getCapabilities(); 7592 7607 7593 7608 Assert( m->state == MediumState_Creating … … 7600 7615 7601 7616 /* ensure the target directory exists */ 7602 rc = VirtualBox::ensureFilePathExists(targetLocation); 7603 if (FAILED(rc)) 7604 throw rc; 7617 if (capabilities & VD_CAP_FILE) 7618 { 7619 rc = VirtualBox::ensureFilePathExists(targetLocation); 7620 if (FAILED(rc)) 7621 throw rc; 7622 } 7605 7623 7606 7624 PVBOXHDD targetHdd;
Note:
See TracChangeset
for help on using the changeset viewer.