Changeset 31344 in vbox for trunk/src/VBox
- Timestamp:
- Aug 3, 2010 3:58:25 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64383
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r31343 r31344 4090 4090 std::list<Utf8Str> llFilesToDelete; 4091 4091 ComObjPtr<Progress> pProgress; 4092 bool fNeedsGlobalSaveSettings; 4092 4093 }; 4093 4094 … … 4100 4101 4101 4102 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 4102 4103 bool fNeedsGlobalSaveSettings = false;4104 4103 4105 4104 HRESULT rc = checkStateDependency(MutableStateDep); … … 4116 4115 // collect files to delete 4117 4116 pTask->llFilesToDelete = mData->llFilesToDelete; // saved states pushed here by Unregister() 4117 4118 pTask->fNeedsGlobalSaveSettings = false; 4118 4119 for (size_t i = 0; i < sfaMedia.size(); ++i) 4119 4120 { … … 4126 4127 // close the medium now; if that succeeds, then that means the medium is no longer 4127 4128 // in use and we can add it to the list of files to delete 4128 rc = pMedium->close(&fNeedsGlobalSaveSettings, mediumAutoCaller); 4129 rc = pMedium->close(&pTask->fNeedsGlobalSaveSettings, 4130 mediumAutoCaller); 4129 4131 if (SUCCEEDED(rc)) 4130 4132 pTask->llFilesToDelete.push_back(bstrLocation); … … 4150 4152 4151 4153 pTask->pProgress.queryInterfaceTo(aProgress); 4152 4153 alock.release();4154 4155 if (fNeedsGlobalSaveSettings)4156 {4157 AutoWriteLock vboxlock(mParent COMMA_LOCKVAL_SRC_POS);4158 mParent->saveSettings();4159 }4160 4154 4161 4155 if (RT_FAILURE(vrc)) … … 4296 4290 RTDirRemove(settingsDir.c_str()); 4297 4291 } 4292 } 4293 4294 alock.release(); 4295 4296 if (task.fNeedsGlobalSaveSettings) 4297 { 4298 AutoWriteLock vboxlock(mParent COMMA_LOCKVAL_SRC_POS); 4299 mParent->saveSettings(); 4298 4300 } 4299 4301
Note:
See TracChangeset
for help on using the changeset viewer.