Changeset 27874 in vbox
- Timestamp:
- Mar 31, 2010 10:08:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r27858 r27874 354 354 ) 355 355 { 356 if (RT_SUCCESS(vrc)) 357 RTFileClose(f); 356 358 if (!aOverride) 357 359 { … … 360 362 mData->m_strConfigFileFull.raw()); 361 363 } 362 if (RT_SUCCESS(vrc)) 363 RTFileClose(f); 364 else 365 { 366 /* try to delete the config file, as otherwise the creation 367 * of a new settings file will fail. */ 368 int vrc2 = RTFileDelete(mData->m_strConfigFileFull.c_str()); 369 if (RT_FAILURE(vrc2)) 370 rc = setError(VBOX_E_FILE_ERROR, 371 tr("Could not delete the settings file '%s' (%Rrc)"), 372 mData->m_strConfigFileFull.raw(), vrc2); 373 } 364 374 } 365 375 else … … 7102 7112 * 7103 7113 * @note Must be never called directly but only from #saveSettings(). 7104 *7105 * @param aRenamed receives |true| if the name was changed and the settings7106 * file was renamed as a result, or |false| otherwise. The7107 * value makes sense only on success.7108 * @param aNew receives |true| if a virgin settings file was created.7109 7114 */ 7110 7115 HRESULT Machine::prepareSaveSettings(bool *pfNeedsGlobalSaveSettings)
Note:
See TracChangeset
for help on using the changeset viewer.