Changeset 35009 in vbox
- Timestamp:
- Dec 13, 2010 1:48:07 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
-
MachineImpl.cpp (modified) (2 diffs)
-
MediumImpl.cpp (modified) (1 diff)
-
include/MediumImpl.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r34854 r35009 4296 4296 // and must be closed first, or closing the parents will fail because they will 4297 4297 // children); 4298 // 2) media from the youngest snapshots followed those from the parent snapshots until4298 // 2) media from the youngest snapshots followed by those from the parent snapshots until 4299 4299 // the root ("first") snapshot of the machine 4300 4300 // This order allows for closing the media on this list from the beginning to the end … … 4402 4402 4403 4403 Utf8Str bstrLocation = pMedium->getLocationFull(); 4404 4405 bool fDoesMediumNeedFileDeletion = pMedium->isMediumFormatFile(); 4406 4404 4407 // close the medium now; if that succeeds, then that means the medium is no longer 4405 4408 // in use and we can add it to the list of files to delete 4406 4409 rc = pMedium->close(&pTask->llRegistriesThatNeedSaving, 4407 4410 mediumAutoCaller); 4408 if (SUCCEEDED(rc) )4411 if (SUCCEEDED(rc) && fDoesMediumNeedFileDeletion) 4409 4412 pTask->llFilesToDelete.push_back(bstrLocation); 4410 4413 } -
trunk/src/VBox/Main/MediumImpl.cpp
r34782 r35009 2953 2953 { 2954 2954 return m->formatObj; 2955 } 2956 2957 /** 2958 * Internal method that returns true if the medium is represented by a file on the host disk 2959 * (and not iSCSI or something). 2960 * @return 2961 */ 2962 bool Medium::isMediumFormatFile() const 2963 { 2964 if ( m->formatObj 2965 && (m->formatObj->getCapabilities() & MediumFormatCapabilities_File) 2966 ) 2967 return true; 2968 return false; 2955 2969 } 2956 2970 -
trunk/src/VBox/Main/include/MediumImpl.h
r33921 r35009 171 171 const Utf8Str& getFormat() const; 172 172 const ComObjPtr<MediumFormat> & getMediumFormat() const; 173 bool isMediumFormatFile() const; 173 174 uint64_t getSize() const; 174 175 DeviceType_T getDeviceType() const;
Note:
See TracChangeset
for help on using the changeset viewer.

